os/bluestore: Fix corruption in BlueFS allocator caused by No-Column-B #43583
Merged
liewegas merged 4 commits intoceph:masterfrom Oct 28, 2021
Merged
os/bluestore: Fix corruption in BlueFS allocator caused by No-Column-B #43583liewegas merged 4 commits intoceph:masterfrom
liewegas merged 4 commits intoceph:masterfrom
Conversation
tchaikov
reviewed
Oct 18, 2021
… only copy the allocation to the shared-allocator after the file was verified and all extents were cleared Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
aclamk
reviewed
Oct 20, 2021
aclamk
reviewed
Oct 20, 2021
| bluefs->sync_metadata(false); | ||
| dout(1) << "Remove Allocation File ret_code=" << ret << dendl; | ||
| } | ||
| return ret; |
Contributor
There was a problem hiding this comment.
The interesting case ! (ret == 0) did not get any douts.
aclamk
reviewed
Oct 20, 2021
aclamk
reviewed
Oct 20, 2021
aclamk
reviewed
Oct 20, 2021
aclamk
approved these changes
Oct 20, 2021
Contributor
aclamk
left a comment
There was a problem hiding this comment.
The code fixes problem with interrupted allocation restoring.
Log/err messages need polishing.
Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
Contributor
Author
|
jenkins test api |
aclamk
approved these changes
Oct 20, 2021
Contributor
Author
|
jenkins test api |
3 tasks
Member
|
jenkins test api |
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.
os/bluestore/BlueStore::NCB - Fix corruption in BlueFS allocator
On startup NCB code will load extents from the allocation-file into shared_alloc.a while walking the allocation file it might find a corruption and the process will be aborted.
We will then run a full recovery building a temp allocator from RocksDB::ONodes and finally copying it into shared_alloc.a which has still some allocation from the first attempt
This issue was fixed by changing restore-allocator code to load allocation into a temp-allocator (lie we already do in the recovery flow) and only when everything was found to be valid copy the allocations into shared_alloc.a.
Fixes: https://tracker.ceph.com/issues/52399
Signed-off-by: Gabriel Benhanokh gbenhano@redhat.com