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>
// 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);
}
}
}