From: Greg Farnum Date: Mon, 28 Jul 2014 21:08:30 +0000 (-0700) Subject: OSD: use OpRequestRef& for a few require_* functions X-Git-Tag: v0.85~96^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb2f1ea2c33647934af878b504383829f5a198ce;p=ceph.git OSD: use OpRequestRef& for a few require_* functions Signed-off-by: Greg Farnum --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 521493934ac8..d3b648cb8252 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6554,7 +6554,7 @@ bool OSD::require_mon_peer(Message *m) return true; } -bool OSD::require_osd_peer(OpRequestRef op) +bool OSD::require_osd_peer(OpRequestRef& op) { if (!op->get_req()->get_connection()->peer_is_osd()) { dout(0) << "require_osd_peer received from non-osd " << op->get_req()->get_connection()->get_peer_addr() @@ -6598,7 +6598,7 @@ bool OSD::require_up_osd_peer(OpRequestRef& op, OSDMapRef& map, * require that we have same (or newer) map, and that * the source is the pg primary. */ -bool OSD::require_same_or_newer_map(OpRequestRef op, epoch_t epoch) +bool OSD::require_same_or_newer_map(OpRequestRef& op, epoch_t epoch) { Message *m = op->get_req(); dout(15) << "require_same_or_newer_map " << epoch << " (i am " << osdmap->get_epoch() << ") " << m << dendl; diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 0373250b91cf..cc9c108a637a 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1801,11 +1801,11 @@ protected: void repeer(PG *pg, map< int, map >& query_map); bool require_mon_peer(Message *m); - bool require_osd_peer(OpRequestRef op); + bool require_osd_peer(OpRequestRef& op); bool require_up_osd_peer(OpRequestRef& Op, OSDMapRef& map, epoch_t their_epoch); - bool require_same_or_newer_map(OpRequestRef op, epoch_t e); + bool require_same_or_newer_map(OpRequestRef& op, epoch_t e); void handle_pg_query(OpRequestRef op); void handle_pg_notify(OpRequestRef op);