]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: exclude kv_backend from dir empty check 11800/head
authorBassam Tabbara <bassam.tabbara@quantum.com>
Sat, 5 Nov 2016 23:00:11 +0000 (16:00 -0700)
committerBassam Tabbara <bassam.tabbara@quantum.com>
Wed, 9 Nov 2016 18:29:48 +0000 (10:29 -0800)
check_mon_data_empty required a completely empty dir. this
made it impossible to mkfs a mondir that uses rocksdb given
the requirement that kv_backend file exist in the mon datadir.

Signed-off-by: Bassam Tabbara <bassam.tabbara@quantum.com>
src/ceph_mon.cc

index 172c9e78ecdb8d80b0753be27bc98d23f599c3da..3b15e56cc3432be986ee3847942f1466a3506b56 100644 (file)
@@ -140,7 +140,8 @@ int check_mon_data_empty()
   errno = 0;
   while ((de = ::readdir(dir))) {
     if (string(".") != de->d_name &&
-       string("..") != de->d_name) {
+       string("..") != de->d_name &&
+       string("kv_backend") != de->d_name) {
       code = -ENOTEMPTY;
       break;
     }