From: Sage Weil Date: Wed, 8 Feb 2017 21:52:27 +0000 (-0500) Subject: osd: BackfillInterval is always bitwise X-Git-Tag: v12.0.1~427^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=32acb10bd024a3ed3282ef6a40a1a54d39f28695;p=ceph.git osd: BackfillInterval is always bitwise Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.h b/src/osd/PG.h index a6c13db3c6b..bb7ecc9b50d 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -726,17 +726,12 @@ public: // info about a backfill interval on a peer eversion_t version; /// version at which the scan occurred map objects; - bool sort_bitwise; hobject_t begin; hobject_t end; - explicit BackfillInterval(bool bitwise=true) - : sort_bitwise(bitwise) - {} - /// clear content - void clear(bool bitwise=true) { - *this = BackfillInterval(bitwise); + void clear() { + *this = BackfillInterval(); } /// clear objects list only @@ -745,8 +740,8 @@ public: } /// reinstantiate with a new start+end position and sort order - void reset(hobject_t start, bool bitwise) { - clear(bitwise); + void reset(hobject_t start) { + clear(); begin = end = start; } diff --git a/src/osd/PrimaryLogPG.cc b/src/osd/PrimaryLogPG.cc index 30e718b1b07..6fb307e3fba 100644 --- a/src/osd/PrimaryLogPG.cc +++ b/src/osd/PrimaryLogPG.cc @@ -10882,29 +10882,18 @@ uint64_t PrimaryLogPG::recover_backfill( assert(last_backfill_started == earliest_backfill()); new_backfill = false; - // initialize BackfillIntervals (with proper sort order) + // initialize BackfillIntervals for (set::iterator i = backfill_targets.begin(); i != backfill_targets.end(); ++i) { - peer_backfill_info[*i].reset(peer_info[*i].last_backfill, - get_sort_bitwise()); + peer_backfill_info[*i].reset(peer_info[*i].last_backfill); } - backfill_info.reset(last_backfill_started, - get_sort_bitwise()); + backfill_info.reset(last_backfill_started); backfills_in_flight.clear(); pending_backfill_updates.clear(); } - // sanity check sort orders - assert(backfill_info.sort_bitwise == get_sort_bitwise()); - for (map::iterator i = - peer_backfill_info.begin(); - i != peer_backfill_info.end(); - ++i) { - assert(i->second.sort_bitwise == get_sort_bitwise()); - } - for (set::iterator i = backfill_targets.begin(); i != backfill_targets.end(); ++i) { @@ -10938,7 +10927,7 @@ uint64_t PrimaryLogPG::recover_backfill( if (backfill_info.begin <= earliest_peer_backfill() && !backfill_info.extends_to_end() && backfill_info.empty()) { hobject_t next = backfill_info.end; - backfill_info.reset(next, get_sort_bitwise()); + backfill_info.reset(next); backfill_info.end = hobject_t::get_max(); update_range(&backfill_info, handle); backfill_info.trim();