]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd/mirror: ignore non-fatal errors when unlinking the snapshot
authorJason Dillaman <dillaman@redhat.com>
Thu, 10 Dec 2020 20:05:04 +0000 (15:05 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 9 Mar 2021 21:13:55 +0000 (16:13 -0500)
Notifications can fail if a client crashes or if we race with the
removal of the image. Either case should be ignored.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 529d3c9a073b6ab11f469fd54c72de2d3650cf18)

src/librbd/mirror/snapshot/UnlinkPeerRequest.cc

index 2c89d251392cd7cede329475efb0b76a595ed2d5..6e1884249360690f5a6e8f7696471eed14eeaaff 100644 (file)
@@ -148,7 +148,10 @@ void UnlinkPeerRequest<I>::handle_notify_update(int r) {
   CephContext *cct = m_image_ctx->cct;
   ldout(cct, 15) << "r=" << r << dendl;
 
-  if (r < 0 && r != -ENOENT) {
+  if (r == -ENOENT || r == -ETIMEDOUT) {
+    // non-fatel errors
+    lderr(cct) << "failed to notify update: " << cpp_strerror(r) << dendl;
+  } else if (r < 0) {
     lderr(cct) << "failed to notify update: " << cpp_strerror(r) << dendl;
     finish(r);
     return;