]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: default journal media to store media if bluefs is disabled 16844/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Sun, 6 Aug 2017 10:50:17 +0000 (18:50 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Sun, 6 Aug 2017 10:58:14 +0000 (18:58 +0800)
So we won't prevent bluestore-without-bluefs backed OSDs from booting:
0> 2017-08-06 18:28:07.431316 7ffa1c95fd00 -1 /home/xxg/build/ceph-dev/src/os/bluestore/BlueStore.cc: In function
'virtual bool BlueStore::is_journal_rotational()' thread 7ffa1c95fd00 time 2017-08-06 18:28:07.428503
/home/xxg/build/ceph-dev/src/os/bluestore/BlueStore.cc: 4401: FAILED assert(bluefs)

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index e28f6e757faeb26d3dcfb0858b4ed26ad7f2b4c0..9d25453838c24a4e41b57dba5215ae4e0c3fd72c 100644 (file)
@@ -4398,7 +4398,11 @@ bool BlueStore::is_rotational()
 
 bool BlueStore::is_journal_rotational()
 {
-  assert(bluefs);
+  if (!bluefs) {
+    dout(5) << __func__ << " bluefs disabled, default to store media type"
+            << dendl;
+    return is_rotational();
+  }
   dout(10) << __func__ << " " << (int)bluefs->wal_is_rotational() << dendl;
   return bluefs->wal_is_rotational();
 }