mirror of
https://github.com/ceph/ceph
synced 2026-08-02 07:03:18 +00:00
os/bluestore: Make maybe_unshare_extents use allocations
Blob is tracking whole AUs in SharedBlob tracker. But the extents may account for just a portion of AUs. We need to compare what would Blob release against SharedBlob tracker. Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
This commit is contained in:
parent
1cebcd999d
commit
96a1a2e25d
@ -18365,11 +18365,12 @@ int BlueStore::_maybe_unshare_on_remove(
|
||||
// Do not account second time.
|
||||
maybe_unshared_blobs.erase(sb);
|
||||
} else {
|
||||
// todo: it seems to be an overkill to go through map()
|
||||
b.map(e.blob_offset, e.length, [&](uint64_t off, uint64_t len) {
|
||||
expect[B].get(off, len);
|
||||
return 0;
|
||||
});
|
||||
for (const auto& e: b.get_extents()) {
|
||||
if (e.is_valid()) {
|
||||
expect[B].get(e.offset, e.length);
|
||||
}
|
||||
}
|
||||
maybe_unshared_blobs.erase(sb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user