]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
filer: fix probe
authorSage Weil <sage.weil@dreamhost.com>
Thu, 3 Feb 2011 23:53:53 +0000 (15:53 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 3 Feb 2011 23:54:25 +0000 (15:54 -0800)
ENOENT is allowed and expected at the end of a journal.  It is treated the
same as a zero size object.

Fixes 800507e891170b99cae10a9bf7c5166fd3512927.

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

index 9398fa94ccd1058889f4d9dd7d681be5e85d8406..4038947156892ddbcc4df26c9445618e74b35d9c 100644 (file)
@@ -39,6 +39,11 @@ public:
   utime_t mtime;
   C_Probe(Filer *f, Probe *p, object_t o) : filer(f), probe(p), oid(o), size(0) {}
   void finish(int r) {
+    if (r == -ENOENT) {
+      r = 0;
+      assert(size == 0);
+    }
+
     // TODO: handle this error.
     assert(r == 0);