From: Adam Kupczyk Date: Mon, 17 Jul 2023 07:31:05 +0000 (+0000) Subject: os/bluestore: Fix split_cache X-Git-Tag: v19.0.0~486^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=47c46b4e89614dcfa00cfa8113b57a711ac782d6;p=ceph.git os/bluestore: Fix split_cache Fix cache was broken as it moved blobs and extents between cache shards without changing atomic num_blobs, num_extent counters. Now tracking counters correctly. Signed-off-by: Adam Kupczyk --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 3e016c9352a1..a7ee1a280bb7 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -5137,6 +5137,8 @@ void BlueStore::Collection::split_cache( << dendl; } } + cache->rm_blob(); + dest->cache->add_blob(); SharedBlob* sb = b->shared_blob.get(); if (sb->coll == dest) { ldout(store->cct, 20) << __func__ << " already moved " << *sb @@ -5160,6 +5162,8 @@ void BlueStore::Collection::split_cache( b.second->last_encoded_id = -1; } for (auto& e : o->extent_map.extent_map) { + cache->rm_extent(); + dest->cache->add_extent(); Blob* tb = e.blob.get(); if (tb->last_encoded_id == -1) { rehome_blob(tb);