From: David Zafman Date: Mon, 17 Feb 2014 02:24:33 +0000 (-0800) Subject: Revert "ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir" X-Git-Tag: v0.78~137^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a9677e136ee4753b86ed1151ca6ff08e4b63473d;p=ceph.git Revert "ReplicatedPG::recover_backfill: adjust last_backfill to HEAD if snapdir" This reverts commit 545135f3e1c75318940caa2c82ac32a53fc4f957. Conflicts: src/osd/ReplicatedPG.cc --- diff --git a/src/common/hobject.h b/src/common/hobject.h index f31604b43bc3..293348356bbc 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 11b5b63eaab1..a332e6a587f8 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() &&