From: Sage Weil Date: Mon, 21 Dec 2015 13:57:18 +0000 (-0500) Subject: os/bluestore: fix fsck contains vs intersects X-Git-Tag: v10.0.3~154^2~116 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=993c87fbca1d0ef98ac68c5eaa6ae71c91b1b0f7;p=ceph.git os/bluestore: fix fsck contains vs intersects Any overlap is an error. Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 859f7a07fe4b..e77fdf53e6fa 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -1755,7 +1755,7 @@ int BlueStore::fsck() } // blocks for (auto& b : o->onode.block_map) { - if (used_blocks.contains(b.second.offset, b.second.length)) { + if (used_blocks.intersects(b.second.offset, b.second.length)) { derr << " " << oid << " extent " << b.first << ": " << b.second << " already allocated" << dendl; ++errors; @@ -1946,7 +1946,7 @@ int BlueStore::fsck() const map& free = fm->get_freelist(); for (map::const_iterator p = free.begin(); p != free.end(); ++p) { - if (used_blocks.contains(p->first, p->second)) { + if (used_blocks.intersects(p->first, p->second)) { derr << __func__ << " free extent " << p->first << "~" << p->second << " intersects allocated blocks" << dendl; ++errors;