]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: more informative error on current/ rename failure
authorSage Weil <sage@newdream.net>
Thu, 8 Apr 2010 16:35:43 +0000 (09:35 -0700)
committerSage Weil <sage@newdream.net>
Thu, 8 Apr 2010 23:42:11 +0000 (16:42 -0700)
src/os/FileStore.cc

index 5323c3846c9fc66b45546ecca82b726e2e26ad9b..b14d95c8197c46a13e86bf29a13acd23abe8bafe 100644 (file)
@@ -593,7 +593,10 @@ int FileStore::mount()
        char s[PATH_MAX];
        snprintf(s, sizeof(s), "%s/current.remove.me.%d", basedir.c_str(), rand());
        r = ::rename(current_fn, s);
-       assert(r == 0);
+       if (r) {
+         dout(0) << "error renaming old current subvol: " << strerror_r(errno, buf, sizeof(buf)) << dendl;
+         return -errno;
+       }
       }
       assert(r == 0);