]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: bluestore repair should use interval_set::union_insert 20900/head
authorIgor Fedotov <ifedotov@suse.com>
Wed, 14 Mar 2018 16:49:44 +0000 (19:49 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Wed, 14 Mar 2018 16:49:44 +0000 (19:49 +0300)
method rather than insert one to handle intersecting/overlapping ranges.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/os/bluestore/BlueStore.cc
src/os/bluestore/BlueStore.h

index 71ad7267e644e4084d78d76011df2944e38371dc..fa2ac290a8f6f5a61b30ec5c6179f94c1976a202 100644 (file)
@@ -6463,7 +6463,7 @@ int BlueStore::_fsck(bool deep, bool repair)
            
            // relying on blob's pextents to decide what to release.
            for (auto& p : pext_to_release) {
-             to_release.insert(p.offset, p.length);
+             to_release.union_insert(p.offset, p.length);
            }
          } else {
            for (auto& p : pext_to_release) {
@@ -6471,7 +6471,7 @@ int BlueStore::_fsck(bool deep, bool repair)
              if (compressed) {
                expected_statfs.compressed_allocated -= p.length;
              }
-             to_release.insert(p.offset, p.length);
+             to_release.union_insert(p.offset, p.length);
            }
          }
          if (bypass_rest) {
index f0b6bc00e9d44e188a658e4b12e0b11c20541adb..83cbd179633eb5d8c64fa674a2e9c5e47d6bc3ff 100644 (file)
@@ -2815,7 +2815,7 @@ public:
   unsigned apply(KeyValueDB* db);
 
   void note_misreference(uint64_t offs, uint64_t len, bool inc_error) {
-    misreferenced_extents.insert(offs, len);
+    misreferenced_extents.union_insert(offs, len);
     if (inc_error) {
       ++to_repair_cnt;
     }