when several extents use the same spanning blob, we reclaim the
blob if all Pextent are to be released, but we erase the spanning blob
from spanning blob map several times. Although it's not a error, I think
it's better to erase the spanning blob with the last Oldextent who's
blob empty flag will be set true.
Signed-off-by: Xiangyang Yu <penglaiyxy@gmail.com>
txc->statfs_delta.compressed_allocated() -= e.length;
}
}
- delete &lo;
- if (b->is_spanning() && !b->is_referenced()) {
+
+ if (b->is_spanning() && !b->is_referenced() && lo.blob_empty) {
dout(20) << __func__ << " spanning_blob_map removing empty " << *b
<< dendl;
o->extent_map.spanning_blob_map.erase(b->id);
}
+ delete &lo;
}
}