]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filestore: assert on ENOTEMPTY
authorSage Weil <sage@newdream.net>
Thu, 10 Mar 2011 21:06:08 +0000 (13:06 -0800)
committerSage Weil <sage@newdream.net>
Thu, 10 Mar 2011 21:06:08 +0000 (13:06 -0800)
ENOTEMPTY implies rmdir failed due to stray crap in the directory.  We
should fail now, instead of later when we restart cosd and have stray
data sitting around.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/os/FileStore.cc

index 4603d4c31511b6edb755f445a51a398a6bb364c1..c4e162f3ec4a47003671f76ad005a6121cb41427 100644 (file)
@@ -1990,6 +1990,9 @@ unsigned FileStore::_do_transaction(Transaction& t)
       assert(0);
     }
 
+    if (r == -ENOTEMPTY) {
+      assert(0 == "ENOTEMPTY suggests garbage data in osd data dir");
+    }
     if (r == -ENOSPC) {
       // For now, if we hit _any_ ENOSPC, crash, before we do any damage
       // by partially applying transactions.