]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: die if we get an ENOENT on a clone
authorSamuel Just <samuel.just@dreamhost.com>
Mon, 20 Jun 2011 16:28:32 +0000 (09:28 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Wed, 22 Jun 2011 18:40:51 +0000 (11:40 -0700)
During recovery, ignoring this would allow a bug in the osd to
erroneously mark the pg clean with incorrectly recovered objects.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
src/os/FileStore.cc

index fce4726ca4f7b29e630997d6e0a70c07ed27f711..cf0540b2560ba3c704a3573aae93e6297e584f4c 100644 (file)
@@ -2530,6 +2530,14 @@ unsigned FileStore::_do_transaction(Transaction& t)
       assert(0);
     }
 
+    if (r == -ENOENT && 
+       (op == Transaction::OP_CLONERANGE ||
+        op == Transaction::OP_CLONE ||
+        op == Transaction::OP_CLONERANGE2)) {
+      // Halt before we incorrectly mark the pg clean
+      assert(0 == "ENOENT on clone suggests osd bug");
+    }
+      
     if (r == -ENOTEMPTY) {
       assert(0 == "ENOTEMPTY suggests garbage data in osd data dir");
     }