]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: Only enable bluestore_bluefs, symlink or create db or db.wal.
authorJianpeng Ma <jianpeng.ma@intel.com>
Tue, 16 Feb 2016 15:33:25 +0000 (23:33 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Tue, 16 Feb 2016 15:33:25 +0000 (23:33 +0800)
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueStore.cc

index d35cd44156cc3c2ce0855063733d383dd12216c8..d52be76251bee64d404afc026d822e9ab29e21c4 100644 (file)
@@ -1711,16 +1711,18 @@ int BlueStore::mkfs()
                                   g_conf->bluestore_block_create);
   if (r < 0)
     goto out_close_fsid;
-  r = _setup_block_symlink_or_file("block.wal", g_conf->bluestore_block_wal_path,
-                                  g_conf->bluestore_block_wal_size,
-                                  g_conf->bluestore_block_wal_create);
-  if (r < 0)
-    goto out_close_fsid;
-  r = _setup_block_symlink_or_file("block.db", g_conf->bluestore_block_db_path,
-                                  g_conf->bluestore_block_db_size,
-                                  g_conf->bluestore_block_db_create);
-  if (r < 0)
-    goto out_close_fsid;
+  if (g_conf->bluestore_bluefs) {
+    r = _setup_block_symlink_or_file("block.wal", g_conf->bluestore_block_wal_path,
+       g_conf->bluestore_block_wal_size,
+       g_conf->bluestore_block_wal_create);
+    if (r < 0)
+      goto out_close_fsid;
+    r = _setup_block_symlink_or_file("block.db", g_conf->bluestore_block_db_path,
+       g_conf->bluestore_block_db_size,
+       g_conf->bluestore_block_db_create);
+    if (r < 0)
+      goto out_close_fsid;
+  }
 
   r = _open_bdev(true);
   if (r < 0)