From: Sage Weil Date: Wed, 11 Oct 2017 21:48:41 +0000 (-0500) Subject: os/bluestore: handle compressed extents in blob unsharing checks X-Git-Tag: v13.0.1~457^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eb26cfbfbb2b9b9fe84dfe9c999e2d67fd2661c0;p=ceph.git os/bluestore: handle compressed extents in blob unsharing checks If the blob is compressed, we aren't mapping to a range within the allocated extents, but rather referencing the entire blob. Fixes: http://tracker.ceph.com/issues/21766 Signed-off-by: Sage Weil --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index f519860c7d61..d2255e018a35 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -10684,10 +10684,14 @@ int BlueStore::_do_remove( if (b.is_shared() && sb->loaded && maybe_unshared_blobs.count(sb)) { - b.map(e.blob_offset, e.length, [&](uint64_t off, uint64_t len) { - expect[sb].get(off, len); - return 0; - }); + if (b.is_compressed()) { + expect[sb].get(0, b.get_ondisk_length()); + } else { + b.map(e.blob_offset, e.length, [&](uint64_t off, uint64_t len) { + expect[sb].get(off, len); + return 0; + }); + } } }