]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: prevent mount if osd_max_object_size >= 4G 19043/head
authorSage Weil <sage@redhat.com>
Mon, 20 Nov 2017 15:30:50 +0000 (09:30 -0600)
committerSage Weil <sage@redhat.com>
Wed, 29 Nov 2017 23:55:21 +0000 (17:55 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/os/bluestore/BlueStore.cc

index e6bf44df03d325bc171fe13e160f4af962eba438..eab4f9e307c56e001825084a72721be32d91e6e8 100644 (file)
@@ -4012,6 +4012,12 @@ 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;
+    return -EINVAL;
+  }
   assert(path_fd < 0);
   path_fd = TEMP_FAILURE_RETRY(::open(path.c_str(), O_DIRECTORY));
   if (path_fd < 0) {