From efacb8d261fd853fc9956e462cc508d16b84b444 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 10 Dec 2020 15:05:04 -0500 Subject: [PATCH] librbd/mirror: ignore non-fatal errors when unlinking the snapshot 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 (cherry picked from commit 529d3c9a073b6ab11f469fd54c72de2d3650cf18) --- src/librbd/mirror/snapshot/UnlinkPeerRequest.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc b/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc index 2c89d251392cd..6e18842493606 100644 --- a/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc +++ b/src/librbd/mirror/snapshot/UnlinkPeerRequest.cc @@ -148,7 +148,10 @@ void UnlinkPeerRequest::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; -- 2.39.5