os/bluestore: move blob and sharedblob on cache splitting

Collection is a member of Blob after previous changes, making it necessary for rehome_blob
to move both Blob and SharedBlob

Signed-off-by: Pere Diaz Bou <pdiabou@redhat.com>
This commit is contained in:
Pere Diaz Bou 2023-09-28 11:42:21 +02:00 committed by Pere Diaz Bou
parent 13b378b6cc
commit 0dacebf563

View File

@ -5174,7 +5174,8 @@ void BlueStore::Collection::split_cache(
cache->rm_blob();
dest->cache->add_blob();
SharedBlob* sb = b->shared_blob.get();
if (sb && sb->collection == dest && b->collection) {
b->collection = dest;
if (sb && sb->collection == dest) {
ldout(store->cct, 20) << __func__ << " already moved " << *sb
<< dendl;
return;
@ -5190,7 +5191,6 @@ void BlueStore::Collection::split_cache(
if (sb) {
sb->collection = dest;
}
b->collection = dest;
};
for (auto& e : o->extent_map.extent_map) {