From a6a07e339aaa733885ac71dcc10e47892c871669 Mon Sep 17 00:00:00 2001 From: John Spray Date: Sat, 4 Feb 2017 21:14:43 +0000 Subject: [PATCH] osdc: make Objecter::osd_command return void 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 --- src/osdc/Objecter.cc | 4 +--- src/osdc/Objecter.h | 10 +++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 854a81f0fc1..595549d3e8e 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -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) diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 0b37e923f60..366759acb92 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -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& cmd, + void osd_command(int osd, vector& 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& cmd, + void pg_command(pg_t pgid, vector& 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 -- 2.47.3