New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luminous: os/bluestore: apply shared_alloc_size to shared device #29860
Closed
Conversation
This file contains 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
Both stupid and bitmap allocator returs -ENOSPC if they're unable to allocate any space. Existing callers aren't always respect this - hence doing some cleanup. Signed-off-by: Igor Fedotov <ifedotov@suse.com> (cherry picked from commit a1246da) - allocator fallback not there - allocator fallback not there
Add a separate config option that controls the alloc_size for the shared device (BDEV_SLOW). Signed-off-by: Sage Weil <sage@redhat.com> (cherry picked from commit c69c953) - no Option::TYPE_SIZE
Keep an alloc_size vector so that we have this value handy at all times. Allow bluestore to fetch this value directly instead of looking at the bluefs_* config options since this encapsulates things a bit better, and also isn't vulnerable to the config setting changing at runtime. Signed-off-by: Sage Weil <sage@redhat.com> (cherry picked from commit e8b5a45) # Conflicts: # src/os/bluestore/BlueFS.cc - missing assert(got != 0) in luminous - ROUND_UP_TO vs round_up_to - missing fallback allocations - no BDEV_NEW* # src/os/bluestore/BlueFS.h - adjacent declarations # src/os/bluestore/BlueStore.cc - P2ROUNDUP vs p2roundup
This does not appear in master because this code was removed with the allocator fallback behavior, which was not backported. Signed-off-by: Sage Weil <sage@redhat.com> (cherry picked from commit 98c04c4)
First try to gift using the larger alloc_size (normally bluefs_alloc_size, but here max(bluefs_alloc_size,bluefs_shared_alloc_size) just in case the settings are weird. If that fails, then try the shared_alloc_size. If that fails, fail and complain as before, with an more accurate error message. Signed-off-by: Sage Weil <sage@redhat.com>
Returning 0 from _balance_bluefs_freespace() skips recording allocations in the superblock, so we fail the consistency check on startup. The elseif branch handles this case already, so just remove it from the first branch. This is luminous/mimic specific, since bluefs extents are not recorded in the superblock in later releases. Signed-off-by: Josh Durgin <jdurgin@redhat.com>
liewegas
approved these changes
Aug 25, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that fix looks right!
#29910 also backports - "os/bluestore/BlueFS: Move bluefs alloc size initialization log message to log level 1" |
superseded by #29910 |
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.
Messy backport of #29537 due to lack of allocator fallback in luminous.