]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore: don't overwrite type if it does already exist and at desired type
authorxie xingguo <xie.xingguo@zte.com.cn>
Fri, 2 Sep 2016 09:48:39 +0000 (17:48 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Fri, 2 Sep 2016 09:48:39 +0000 (17:48 +0800)
Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 260e328b2a1a66aacd1720b63fb18b66f6254d19..a9872f8a9c8cf8ee576beb8914e74be7efa59212 100644 (file)
@@ -2690,10 +2690,11 @@ int BlueStore::mkfs()
        dout(1) << __func__ << " expected bluestore, but type is " << type << dendl;
        return -EIO;
       }
+    } else {
+      r = write_meta("type", "bluestore");
+      if (r < 0)
+        return r;
     }
-    r = write_meta("type", "bluestore");
-    if (r < 0)
-      return r;
   }
 
   freelist_type = g_conf->bluestore_freelist_type;