mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
os/bluestore: refuse to mkfs or mount if osd_max_object_size >= MAX_OBJECT_SIZE
BlueStore has its own object size limit (2^32-1). Make sure the cluster limit is below that or refuse to mkfs or mount. Signed-off-by: Sage Weil <sage@redhat.com>
This commit is contained in:
parent
e6514a0567
commit
377fdb1484
@ -6016,6 +6016,13 @@ int BlueStore::mkfs()
|
||||
int r;
|
||||
uuid_d old_fsid;
|
||||
|
||||
if (cct->_conf->osd_max_object_size > OBJECT_MAX_SIZE) {
|
||||
derr << __func__ << " osd_max_object_size "
|
||||
<< cct->_conf->osd_max_object_size << " > bluestore max "
|
||||
<< OBJECT_MAX_SIZE << dendl;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
{
|
||||
string done;
|
||||
r = read_meta("mkfs_done", &done);
|
||||
@ -6650,6 +6657,13 @@ int BlueStore::_mount(bool kv_only, bool open_db)
|
||||
}
|
||||
}
|
||||
|
||||
if (cct->_conf->osd_max_object_size > OBJECT_MAX_SIZE) {
|
||||
derr << __func__ << " osd_max_object_size "
|
||||
<< cct->_conf->osd_max_object_size << " > bluestore max "
|
||||
<< OBJECT_MAX_SIZE << dendl;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int r = _open_path();
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
Loading…
Reference in New Issue
Block a user