From a9677e136ee4753b86ed1151ca6ff08e4b63473d Mon Sep 17 00:00:00 2001 From: David Zafman Date: Sun, 16 Feb 2014 18:24:33 -0800 Subject: [PATCH] Revert "ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir" This reverts commit 545135f3e1c75318940caa2c82ac32a53fc4f957. Conflicts: src/osd/ReplicatedPG.cc --- src/common/hobject.h | 5 ----- src/osd/ReplicatedPG.cc | 10 ---------- 2 files changed, 15 deletions(-) diff --git a/src/common/hobject.h b/src/common/hobject.h index f31604b43bc34..293348356bbc2 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -95,11 +95,6 @@ public: return ret; } - /// @return true if object is snapdir - bool is_snapdir() const { - return snap == CEPH_SNAPDIR; - } - /// @return snapdir version of this hobject_t hobject_t get_snapdir() const { hobject_t ret(*this); diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc index 11b5b63eaab1b..a332e6a587f83 100644 --- a/src/osd/ReplicatedPG.cc +++ b/src/osd/ReplicatedPG.cc @@ -9887,16 +9887,6 @@ int ReplicatedPG::recover_backfill( } dout(10) << "possible new_last_backfill at " << new_last_backfill << dendl; - /* If last_backfill is snapdir, we know that head necessarily cannot exist, - * therefore it's safe to bump the snap up to NOSNAP. This is necessary - * since we need avoid having SNAPDIR backfilled and HEAD not backfilled - * since a transaction on HEAD might change SNAPDIR - */ - if (new_last_backfill.is_snapdir()) - new_last_backfill = new_last_backfill.get_head(); - if (last_backfill_started.is_snapdir()) - last_backfill_started = last_backfill_started.get_head(); - assert(!pending_backfill_updates.empty() || new_last_backfill == last_backfill_started); if (pending_backfill_updates.empty() && -- 2.39.5