Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
mimic: os/bluestore: apply shared_alloc_size to shared device with log level change #30219
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 <firstname.lastname@example.org> (cherry picked from commit a1246da) - allocator fallback not there - allocator fallback not there
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 <email@example.com> (cherry picked from commit e8b5a45) Conflicts: src/os/bluestore/BlueFS.cc - assert vs ceph_assert - no allocator naming - missing some device expansion code - missing allocator fallback - no BDEV_NEW* src/os/bluestore/BlueStore.cc - missing allocator fallback, has freespace balancing code - degenerates into a pretty trivial patch to this file
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. This is a slightly modified version of the luminous patch, 91a1fa1 Signed-off-by: Sage Weil <firstname.lastname@example.org>
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 <email@example.com>
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.