]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc: make Objecter::osd_command return void
authorJohn Spray <john.spray@redhat.com>
Sat, 4 Feb 2017 21:14:43 +0000 (21:14 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 9 Mar 2017 13:30:06 +0000 (13:30 +0000)
The int return was misleading because it didn't
really have any error cases.  We sometimes use
ints in APIs in case we want to return an error
in future, but Objecter is an internal interface.

Signed-off-by: John Spray <john.spray@redhat.com>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 854a81f0fc174461eae609c496ca7a452f25c92c..595549d3e8e5950bcd0cc86485c18b57d2382565 100644 (file)
@@ -4674,7 +4674,7 @@ void Objecter::handle_command_reply(MCommandReply *m)
     s->put();
 }
 
-int Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
+void Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
 {
   shunique_lock sul(rwlock, ceph::acquire_unique);
 
@@ -4706,8 +4706,6 @@ int Objecter::submit_command(CommandOp *c, ceph_tid_t *ptid)
   *ptid = tid;
 
   logger->inc(l_osdc_command_active);
-
-  return 0;
 }
 
 int Objecter::_calc_command_target(CommandOp *c, shunique_lock& sul)
index 0b37e923f60c4e58d7bd58bb7769c203a0f4e6f6..366759acb92c61217ce9126976dbb705c93139b2 100644 (file)
@@ -1554,7 +1554,7 @@ public:
 
   };
 
-  int submit_command(CommandOp *c, ceph_tid_t *ptid);
+  void submit_command(CommandOp *c, ceph_tid_t *ptid);
   int _calc_command_target(CommandOp *c, shunique_lock &sul);
   void _assign_command_session(CommandOp *c, shunique_lock &sul);
   void _send_command(CommandOp *c);
@@ -2112,7 +2112,7 @@ public:
   epoch_t op_cancel_writes(int r, int64_t pool=-1);
 
   // commands
-  int osd_command(int osd, vector<string>& cmd,
+  void osd_command(int osd, vector<string>& cmd,
                  const bufferlist& inbl, ceph_tid_t *ptid,
                  bufferlist *poutbl, string *prs, Context *onfinish) {
     assert(osd >= 0);
@@ -2123,9 +2123,9 @@ public:
       poutbl,
       prs,
       onfinish);
-    return submit_command(c, ptid);
+    submit_command(c, ptid);
   }
-  int pg_command(pg_t pgid, vector<string>& cmd,
+  void pg_command(pg_t pgid, vector<string>& cmd,
                 const bufferlist& inbl, ceph_tid_t *ptid,
                 bufferlist *poutbl, string *prs, Context *onfinish) {
     CommandOp *c = new CommandOp(
@@ -2135,7 +2135,7 @@ public:
       poutbl,
       prs,
       onfinish);
-    return submit_command(c, ptid);
+    submit_command(c, ptid);
   }
 
   // mid-level helpers