From: Jason Dillaman Date: Thu, 21 May 2015 04:22:07 +0000 (-0400) Subject: librbd: hide ENOENT errors during copyup operations X-Git-Tag: v9.0.2~13^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9055eb6c0abbc275964f85c2ac800079ba4e5c94;p=ceph.git librbd: hide ENOENT errors during copyup operations It's possible for this to occur when shrinking an image with snapshots and a zeroed data block. Signed-off-by: Jason Dillaman --- diff --git a/src/librbd/CopyupRequest.cc b/src/librbd/CopyupRequest.cc index c6488b3243ee..689c0cfac15f 100644 --- a/src/librbd/CopyupRequest.cc +++ b/src/librbd/CopyupRequest.cc @@ -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);