Skip to content

Commit

Permalink
os/bluestore: drop unreferenced spanning blobs
Browse files Browse the repository at this point in the history
Otherwise we can "leak" these and keep them around indefinitely.

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Sep 23, 2016
1 parent c621146 commit 8f40caf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7380,6 +7380,13 @@ void BlueStore::_wctx_finish(
if (blob.is_compressed()) {
txc->statfs_delta.compressed() -= blob.get_compressed_payload_length();
}
if (b->id >= 0) {
// explicitly remove from spanning map
dout(20) << __func__ << " spanning_blob_map removing empty " << *b
<< dendl;
auto it = o->extent_map.spanning_blob_map.iterator_to(*b);
o->extent_map.spanning_blob_map.erase(it);
}
}
txc->statfs_delta.stored() -= lo.length;
if (blob.is_compressed()) {
Expand Down

0 comments on commit 8f40caf

Please sign in to comment.