]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: drop _open_alloc() from mkfs
authorxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Jun 2017 02:02:55 +0000 (10:02 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Thu, 22 Jun 2017 05:52:14 +0000 (13:52 +0800)
This is useless as the fsck() process will do necessary validations later.
And dropping this can make mkfs slightly faster.

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

index 970454f5ce51bf07490a8a31c0829494035a6711..81b64ea6f579a8baba8b150879ea39f1cc10e493 100644 (file)
@@ -5088,27 +5088,23 @@ int BlueStore::mkfs()
     db->submit_transaction_sync(t);
   }
 
-  r = _open_alloc();
-  if (r < 0)
-    goto out_close_fm;
 
   r = write_meta("kv_backend", cct->_conf->bluestore_kvbackend);
   if (r < 0)
-    goto out_close_alloc;
+    goto out_close_fm;
+
   r = write_meta("bluefs", stringify((int)cct->_conf->bluestore_bluefs));
   if (r < 0)
-    goto out_close_alloc;
+    goto out_close_fm;
 
   if (fsid != old_fsid) {
     r = _write_fsid();
     if (r < 0) {
       derr << __func__ << " error writing fsid: " << cpp_strerror(r) << dendl;
-      goto out_close_alloc;
+      goto out_close_fm;
     }
   }
 
- out_close_alloc:
-  _close_alloc();
  out_close_fm:
   _close_fm();
  out_close_db: