]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
BlueStore: Fixed a memory leak 11223/head
authorSomnath Roy <somnath.roy@sandisk.com>
Mon, 26 Sep 2016 00:52:00 +0000 (17:52 -0700)
committerSomnath Roy <somnath.roy@sandisk.com>
Mon, 26 Sep 2016 00:52:00 +0000 (17:52 -0700)
If a Blob is spanning is not getting deleted as spanning_blob_map
is holding one ref.Explicitly decreasing Blob ref from ExtentMap
destructor and erasing from spanning_blob_map is fixing the leak.

Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
src/os/bluestore/BlueStore.h

index b206bb087b14c5cf42a076b93b75c74578c0beaf..2fe63f501b6c7009b73ed54d764c1c4965076e3e 100644 (file)
@@ -554,6 +554,7 @@ public:
 
     ExtentMap(Onode *o);
     ~ExtentMap() {
+      spanning_blob_map.clear_and_dispose([&](Blob *b) { b->put(); });
       extent_map.clear_and_dispose([&](Extent *e) { delete e; });
     }