From 9b84633f572ffa87333e94610c5e7aa04de59288 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 31 Aug 2017 17:23:35 -0400 Subject: [PATCH] osd/PrimaryLogPG: maybe_await_blocked_{snapset->head} Signed-off-by: Sage Weil --- src/osd/PrimaryLogPG.cc | 13 ++----------- src/osd/PrimaryLogPG.h | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index abd69aa922bea..f3f3eb96c111c 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -676,7 +676,7 @@ void PrimaryLogPG::block_write_on_degraded_snap( wait_for_degraded_object(snap, op); } -bool PrimaryLogPG::maybe_await_blocked_snapset( +bool PrimaryLogPG::maybe_await_blocked_head( const hobject_t &hoid, OpRequestRef op) { @@ -690,15 +690,6 @@ bool PrimaryLogPG::maybe_await_blocked_snapset( return false; } } - obc = object_contexts.lookup(hoid.get_snapdir()); - if (obc) { - if (obc->is_blocked()) { - wait_for_blocked_object(obc->obs.oi.soid, op); - return true; - } else { - return false; - } - } return false; } @@ -2093,7 +2084,7 @@ void PrimaryLogPG::do_op(OpRequestRef& op) // io blocked on obc? if (!m->has_flag(CEPH_OSD_FLAG_FLUSH) && - maybe_await_blocked_snapset(oid, op)) { + maybe_await_blocked_head(oid, op)) { return; } diff --git a/src/osd/PrimaryLogPG.h b/src/osd/PrimaryLogPG.h index bc4279b142333..51270e66efdde 100644 --- a/src/osd/PrimaryLogPG.h +++ b/src/osd/PrimaryLogPG.h @@ -1745,7 +1745,7 @@ public: const hobject_t& oid, ObjectContextRef obc, OpRequestRef op); void block_write_on_degraded_snap(const hobject_t& oid, OpRequestRef op); - bool maybe_await_blocked_snapset(const hobject_t &soid, OpRequestRef op); + bool maybe_await_blocked_head(const hobject_t &soid, OpRequestRef op); void wait_for_blocked_object(const hobject_t& soid, OpRequestRef op); void kick_object_context_blocked(ObjectContextRef obc); -- 2.39.5