diff options
author | Pere Diaz Bou <pdiabou@redhat.com> | 2023-09-25 12:11:12 +0200 |
---|---|---|
committer | Pere Diaz Bou <pere-altea@hotmail.com> | 2024-02-08 12:16:35 +0100 |
commit | 8961e2cca30afefaada7ba57b1e7458e3a29c754 (patch) | |
tree | e3f8ab1edf008b295ad922a64c87c05eee0c8e4f | |
parent | os/bluestore: rehome Blob AND SharedBlob (diff) | |
download | ceph-8961e2cca30afefaada7ba57b1e7458e3a29c754.tar.xz ceph-8961e2cca30afefaada7ba57b1e7458e3a29c754.zip |
os/bluestore: add missing add_blobs
Signed-off-by: Pere Diaz Bou <pdiabou@redhat.com>
-rw-r--r-- | src/os/bluestore/BlueStore.cc | 6 | ||||
-rw-r--r-- | src/os/bluestore/BlueStore.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 8eed5329b48..b96757a1e2b 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -2172,10 +2172,10 @@ BlueStore::Blob::~Blob() return; } again: - auto coll_cache = sb->get_cache(); + auto coll_cache = get_cache(); if (coll_cache) { std::lock_guard l(coll_cache->lock); - if (coll_cache != sb->get_cache()) { + if (coll_cache != get_cache()) { goto again; } bc._clear(coll_cache); @@ -3920,7 +3920,6 @@ bool BlueStore::ExtentMap::encode_some( denc_varint(0, bound); // len denc_varint(0, bound); // blob_offset - dout(1) << "Pere blob " << p->blob << dendl; p->blob->bound_encode( bound, struct_v, @@ -4986,6 +4985,7 @@ void BlueStore::Collection::open_shared_blob(uint64_t sbid, BlobRef b) const bluestore_blob_t& blob = b->get_blob(); if (!blob.is_shared()) { b->collection = this; + b->get_cache()->add_blob(); return; } diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 7407963cd39..cc2ef5e430e 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -615,6 +615,7 @@ public: ceph_assert(!shared_blob); sbid_unloaded = sb->get_sbid(); shared_blob = sb; + collection = sb->coll; ceph_assert(get_cache()); get_cache()->add_blob(); } @@ -1628,6 +1629,7 @@ private: BlobRef new_blob() { BlobRef b = new Blob(); b->collection = this; + b->get_cache()->add_blob(); return b; } |