mirror of
https://github.com/ceph/ceph
synced 2025-01-20 01:51:34 +00:00
os/bluestore: move sharedblob to new collection in same shard
We have to move the SharedBlob to the new collection even if the new collection is part of the same cache shard. It's only the buffers that need to be conditioned on the shard. Fixes: http://tracker.ceph.com/issues/20358 Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
27697a443d
commit
3befb062c7
@ -3238,12 +3238,13 @@ void BlueStore::Collection::split_cache(
|
||||
}
|
||||
ldout(store->cct, 20) << __func__ << " moving " << *sb << dendl;
|
||||
sb->coll = dest;
|
||||
if (sb->get_sbid()) {
|
||||
ldout(store->cct, 20) << __func__
|
||||
<< " moving registration " << *sb << dendl;
|
||||
shared_blob_set.remove(sb);
|
||||
dest->shared_blob_set.add(dest, sb);
|
||||
}
|
||||
if (dest->cache != cache) {
|
||||
if (sb->get_sbid()) {
|
||||
ldout(store->cct, 20) << __func__ << " moving registration " << *sb << dendl;
|
||||
shared_blob_set.remove(sb);
|
||||
dest->shared_blob_set.add(dest, sb);
|
||||
}
|
||||
for (auto& i : sb->bc.buffer_map) {
|
||||
if (!i.second->is_writing()) {
|
||||
ldout(store->cct, 20) << __func__ << " moving " << *i.second
|
||||
@ -3253,8 +3254,6 @@ void BlueStore::Collection::split_cache(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -7792,7 +7791,7 @@ void BlueStore::_txc_write_nodes(TransContext *txc, KeyValueDB::Transaction t)
|
||||
bufferlist bl;
|
||||
::encode(*(sb->persistent), bl);
|
||||
dout(20) << " shared_blob 0x" << std::hex << sbid << std::dec
|
||||
<< " is " << bl.length() << dendl;
|
||||
<< " is " << bl.length() << " " << *sb << dendl;
|
||||
t->set(PREFIX_SHARED_BLOB, key, bl);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user