]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: hide ENOENT errors during copyup operations
authorJason Dillaman <dillaman@redhat.com>
Thu, 21 May 2015 04:22:07 +0000 (00:22 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 5 Jun 2015 16:24:27 +0000 (12:24 -0400)
It's possible for this to occur when shrinking an image with
snapshots and a zeroed data block.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/CopyupRequest.cc

index c6488b3243eefff51bfa95f55dc424b10ffb3ecb..689c0cfac15f9fadf5ed664d2f3cbe7265550594 100644 (file)
@@ -237,7 +237,12 @@ private:
       pending_copyups = m_pending_copyups.dec();
       ldout(cct, 20) << "COPYUP (" << pending_copyups << " pending)"
                      << dendl;
-      if (r < 0) {
+      if (r == -ENOENT) {
+        // hide the -ENOENT error if this is the last op
+        if (pending_copyups == 0) {
+          complete_requests(0);
+        }
+      } else if (r < 0) {
         complete_requests(r);
       }
       return (pending_copyups == 0);