Merge pull request #19725 from shinobu-x/osd_max_object_size

osd,os/bluestore: Display current size of osd_max_object_size

Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Kefu Chai 2018-01-06 00:02:28 +08:00 committed by GitHub
commit 92eae109a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -4112,9 +4112,11 @@ int BlueStore::get_block_device_fsid(CephContext* cct, const string& path,
int BlueStore::_open_path()
{
// sanity check(s)
if (cct->_conf->get_val<uint64_t>("osd_max_object_size") >=
4*1024*1024*1024ull) {
derr << __func__ << " osd_max_object_size >= 4GB; BlueStore has hard limit of 4GB." << dendl;
auto osd_max_object_size =
cct->_conf->get_val<uint64_t>("osd_max_object_size");
if (osd_max_object_size >= 4*1024*1024*1024ull) {
derr << __func__ << " osd_max_object_size: " << osd_max_object_size
<< "; BlueStore has hard limit of 4GB." << dendl;
return -EINVAL;
}
assert(path_fd < 0);

View File

@ -4580,8 +4580,8 @@ static int check_offset_and_length(uint64_t offset, uint64_t length,
length > max ||
offset + length > max) {
ldpp_dout(dpp, 10) << __func__ << " "
<< "osd_max_object_size >= 4GB; Hard limit of object size is 4GB.\n"
<< dendl;
<< "osd_max_object_size: " << max
<< "; Hard limit of object size is 4GB." << dendl;
return -EFBIG;
}