From: Jianpeng Ma Date: Tue, 9 Jan 2018 11:51:26 +0000 (+0800) Subject: os/bluestore: using macro OBJECT_MAX_SIZE to check object max size. X-Git-Tag: v13.0.2~576^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F19622%2Fhead;p=ceph.git os/bluestore: using macro OBJECT_MAX_SIZE to check object max size. Signed-off-by: Jianpeng Ma --- diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index 7006cc385a5..b998640c5c4 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -4114,9 +4114,9 @@ int BlueStore::_open_path() // sanity check(s) auto osd_max_object_size = cct->_conf->get_val("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; + if (osd_max_object_size >= (uint64_t)OBJECT_MAX_SIZE) { + derr << __func__ << " osd_max_object_size >= 0x" << std::hex << OBJECT_MAX_SIZE + << "; BlueStore has hard limit of 0x" << OBJECT_MAX_SIZE << "." << std::dec << dendl; return -EINVAL; } assert(path_fd < 0);