]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
FileStore: ignore ERANGE and ENOENT on replay
authorSamuel Just <samuel.just@dreamhost.com>
Mon, 12 Mar 2012 20:33:55 +0000 (13:33 -0700)
committerSamuel Just <samuel.just@dreamhost.com>
Mon, 12 Mar 2012 21:58:26 +0000 (14:58 -0700)
The source object may either not exist or be the wrong size
during replay if the destination object was deleted in a future
already-applied operation.  This should not impact correctness
of the replay.

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

index c8c713afa277661cb1cf61097db487f3746bde10..7f198dfd8f49a129b85a05f0bb467c125a5b2164 100644 (file)
@@ -2725,6 +2725,14 @@ unsigned FileStore::_do_transaction(Transaction& t, uint64_t op_seq, int trans_n
          dout(10) << "tolerating EEXIST during journal replay since btrfs_snap is not enabled" << dendl;
          ok = true;
        }
+       if (r == -ERANGE) {
+         dout(10) << "tolerating ERANGE on replay" << dendl;
+         ok = true;
+       }
+       if (r == -ENOENT) {
+         dout(10) << "tolerating ENOENT on replay" << dendl;
+         ok = true;
+       }
       }
 
       if (!ok) {