]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: prevent mount if osd_max_object_size >= 4G 19630/head
authorSage Weil <sage@redhat.com>
Mon, 20 Nov 2017 15:30:50 +0000 (09:30 -0600)
committerShinobu Kinjo <shinobu@redhat.com>
Thu, 21 Dec 2017 10:16:26 +0000 (19:16 +0900)
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit f284bbb0593eafc25013c01c8aa7b8bdfc39d906)

src/os/bluestore/BlueStore.cc

index 5fe5b98c5dd074980957be21127afc53bb07d029..5bb8dd0b2d56770ed199493f4340ab6b9933aee4 100644 (file)
@@ -4004,6 +4004,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) {