Skip to content

os/bluestore: fix a few leaks#11068

Merged
liewegas merged 7 commits intoceph:masterfrom
liewegas:wip-bluestore-leaks
Sep 14, 2016
Merged

os/bluestore: fix a few leaks#11068
liewegas merged 7 commits intoceph:masterfrom
liewegas:wip-bluestore-leaks

Conversation

@liewegas
Copy link
Member

No description provided.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
Matches rm().

Signed-off-by: Sage Weil <sage@redhat.com>

ExtentMap(Onode *o);
~ExtentMap() {
auto p = extent_map.begin();
Copy link
Contributor

@ifed01 ifed01 Sep 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you may use something like that instead:
extent_map.clear_and_dispose( [](Extent* e) {delete e;});

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, cool! Updated.

@ifed01
Copy link
Contributor

ifed01 commented Sep 14, 2016

LGTM

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
We need to remove items from the cache LRUs in their
destructors, and it is very awkward to ensure that all
releasing paths either hold the cache lock or have
already cleared the cache items out.

Signed-off-by: Sage Weil <sage@redhat.com>
Signed-off-by: Sage Weil <sage@redhat.com>
@liewegas liewegas merged commit 5fc0ac9 into ceph:master Sep 14, 2016
@liewegas liewegas deleted the wip-bluestore-leaks branch September 14, 2016 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants