]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: BackfillInterval is always bitwise
authorSage Weil <sage@redhat.com>
Wed, 8 Feb 2017 21:52:27 +0000 (16:52 -0500)
committerSage Weil <sage@redhat.com>
Sat, 11 Feb 2017 15:45:16 +0000 (10:45 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/PG.h
src/osd/PrimaryLogPG.cc

index a6c13db3c6b583d8ea5d3ade463341b19b2490f2..bb7ecc9b50de5f6621774e8ff319c6f4f2b48390 100644 (file)
@@ -726,17 +726,12 @@ public:
     // info about a backfill interval on a peer
     eversion_t version; /// version at which the scan occurred
     map<hobject_t,eversion_t> 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;
     }
 
index 30e718b1b07be2902d19987bb72e063797ede595..6fb307e3fbaf5f9cb8d322f99cfa259392dae640 100644 (file)
@@ -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<pg_shard_t>::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<pg_shard_t, BackfillInterval>::iterator i =
-        peer_backfill_info.begin();
-       i != peer_backfill_info.end();
-       ++i) {
-    assert(i->second.sort_bitwise == get_sort_bitwise());
-  }
-
   for (set<pg_shard_t>::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();