summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPere Diaz Bou <pere-altea@hotmail.com>2023-12-14 19:43:07 +0100
committerPere Diaz Bou <pere-altea@hotmail.com>2024-02-08 12:16:36 +0100
commit4f6245fe1bde3690a31cf2c626fbaf3141af6c26 (patch)
tree7db6eed97ba11d475c18a6517883a440edb9fe9b /src
parentos/bluestore: test unshare blob + clone errors (diff)
downloadceph-4f6245fe1bde3690a31cf2c626fbaf3141af6c26.tar.xz
ceph-4f6245fe1bde3690a31cf2c626fbaf3141af6c26.zip
os/bluestore: set to nullptr sharedblob on unshare
set_shared_blob requires shared_blob to be a nullptr to ensure it's correct operation. Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/os/bluestore/BlueStore.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc
index 2c76964e588..99d12f3f22f 100644
--- a/src/os/bluestore/BlueStore.cc
+++ b/src/os/bluestore/BlueStore.cc
@@ -16908,10 +16908,7 @@ int BlueStore::_do_remove(
// but now those 2 blobs share it.
// This is illegal, as empty shared blobs should be unique.
// Fixing by re-creation.
-
- // Here we skip set_shared_blob() because e.blob is already in BufferCacheShard
- // and cannot do add_blob() twice
- e.blob->get_dirty_shared_blob() = new SharedBlob(c.get());
+ e.blob->get_dirty_shared_blob() = nullptr;
}
h->extent_map.dirty_range(e.logical_offset, 1);
}