From: Sage Weil Date: Thu, 8 Apr 2010 16:35:43 +0000 (-0700) Subject: filestore: more informative error on current/ rename failure X-Git-Tag: v0.20~88 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=736a271834e942787549a121d65a8f185467f36b;p=ceph.git filestore: more informative error on current/ rename failure --- diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 5323c3846c9..b14d95c8197 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -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);