Skip to content
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

jdurgin
Copy link
Member

@jdurgin jdurgin commented Aug 24, 2019

Messy backport of #29537 due to lack of allocator fallback in luminous.

liewegas and others added 6 commits August 20, 2019 10:29
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>
Copy link
Member

@liewegas liewegas left a 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!

@vumrao
Copy link
Contributor

vumrao commented Aug 26, 2019

#29910 also backports - "os/bluestore/BlueFS: Move bluefs alloc size initialization log message to log level 1"

@jdurgin
Copy link
Member Author

jdurgin commented Aug 26, 2019

superseded by #29910

@jdurgin jdurgin closed this Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants