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

os/bluestore: set bitmap freelist resolution to min_alloc_size #17610

Merged
merged 5 commits into from
Sep 14, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4555,6 +4555,13 @@ int BlueStore::_open_db(bool create)
bdev->get_size() * (cct->_conf->bluestore_bluefs_min_ratio +
cct->_conf->bluestore_bluefs_gift_ratio);
initial = MAX(initial, cct->_conf->bluestore_bluefs_min);
if (cct->_conf->bluefs_alloc_size % min_alloc_size) {
Copy link
Member

@xiexingguo xiexingguo Sep 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not right. We haven't choose a proper min_alloc_size yet by now. See mkfs.
Sorry for the noise, should go through the whole change set first:-)

derr << __func__ << " bluefs_alloc_size 0x" << std::hex
<< cct->_conf->bluefs_alloc_size << " is not a multiple of "
<< "min_alloc_size 0x" << min_alloc_size << std::dec << dendl;
r = -EINVAL;
goto free_bluefs;
}
// align to bluefs's alloc_size
initial = P2ROUNDUP(initial, cct->_conf->bluefs_alloc_size);
// put bluefs in the middle of the device in case it is an HDD
Expand Down