]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: don't croak if current/ exists
authorSage Weil <sage@newdream.net>
Thu, 14 Jan 2010 23:46:26 +0000 (15:46 -0800)
committerSage Weil <sage@newdream.net>
Fri, 15 Jan 2010 00:00:58 +0000 (16:00 -0800)
src/os/FileStore.cc

index cbb6e2f7b345f940e571902d5e19ba409fff87ad..c609c641405dc1f3962352f29e87fe26f5405340 100644 (file)
@@ -295,6 +295,8 @@ int FileStore::mkfs()
   } else if (errno == EOPNOTSUPP || errno == ENOTTY) {
     dout(2) << " BTRFS_IOC_SUBVOL_CREATE ioctl failed, trying mkdir " << current_fn << dendl;
     r = ::mkdir(current_fn, 0755);
+    if (errno == EEXIST)
+      r = 0;
   }
   ::close(fd);
   if (r < 0) {