os/bluestore: Onode reference counting refactor, prune deleted onodes#38423
Closed
aclamk wants to merge 5 commits intoceph:masterfrom
Closed
os/bluestore: Onode reference counting refactor, prune deleted onodes#38423aclamk wants to merge 5 commits intoceph:masterfrom
aclamk wants to merge 5 commits intoceph:masterfrom
Conversation
Got rid of OnodeCacheShard pin() and unpin() functions. Moved their validator logic right into Onode put and get functions. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Modified Onode ref counting to make clear state transitions. It makes it viable to introduce additional states. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Added logic for erasing onode from onode_map it is last reference and exists==false. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
…ation When onode.exists == false getting reference and then releasing it might delete it from container. It must not happen during iteration. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Just making sure onode does not get deleted. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
86f9421 to
c30142e
Compare
Contributor
|
i suspect that this PR caused the issues reported by valgrind. see /a/kchai-2020-12-05_02:16:41-rados-wip-kefu-testing-2020-12-04-1516-distro-basic-smithi/5681129$ zless remote/*/log/valgrind/osd.1.log.gz for more instances, see https://pulpito.ceph.com/kchai-2020-12-05_02:16:41-rados-wip-kefu-testing-2020-12-04-1516-distro-basic-smithi/ |
Contributor
Author
|
Xchg logic is broken. |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR modifies handling of state changes in Onode, as reflected by nref change.
Now it consists of 2 parts - atomic modification of counter and update of Onode state under lock.
As result it was possible to make easy modification to prune deleted onodes (exists == false) from onode_map.
This PR is necessary for work on Onode memory regions.