From d0f2c4891bbcc1938bee15b3fc0bfb796ce4c7de Mon Sep 17 00:00:00 2001 From: Greg Farnum Date: Mon, 28 Jul 2014 14:08:30 -0700 Subject: [PATCH] OSD: use OpRequestRef& for a few require_* functions Signed-off-by: Greg Farnum (cherry picked from commit eb2f1ea2c33647934af878b504383829f5a198ce) --- src/osd/OSD.cc | 4 ++-- src/osd/OSD.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 3ccedcb3e8377..deca111dd10d8 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -6127,7 +6127,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() @@ -6171,7 +6171,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 080be8c13f4e1..efb3a0c460bd3 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1513,11 +1513,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); -- 2.39.5