]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: set to nullptr sharedblob on unshare
authorPere Diaz Bou <pere-altea@hotmail.com>
Thu, 14 Dec 2023 18:43:07 +0000 (19:43 +0100)
committerPere Diaz Bou <pere-altea@hotmail.com>
Thu, 8 Feb 2024 11:16:36 +0000 (12:16 +0100)
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>
src/os/bluestore/BlueStore.cc

index 2c76964e588bff6de868ef49b651ab9c73419320..99d12f3f22f82e00fd100c8883ac2a1dd8a335ca 100644 (file)
@@ -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);
     }