diff options
Diffstat (limited to 'sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch')
-rw-r--r-- | sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch b/sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch new file mode 100644 index 000000000000..6800285318f0 --- /dev/null +++ b/sys-cluster/ceph/files/ceph-10.2.9-librbd_filter_expected_error_codes_from_is_exclusive_lock_owner.patch @@ -0,0 +1,28 @@ +From 787ba33e5dba285dff874955a8f0d7aabd3f87fe Mon Sep 17 00:00:00 2001 +From: Jason Dillaman <dillaman@redhat.com> +Date: Mon, 5 Jun 2017 08:17:05 -0400 +Subject: [PATCH] librbd: filter expected error codes from + is_exclusive_lock_owner + +Fixes: http://tracker.ceph.com/issues/20182 +Signed-off-by: Jason Dillaman <dillaman@redhat.com> +(cherry picked from commit d4daaf54e6bc42cd4fb2111ea20b2042941b0c31) +--- + src/librbd/internal.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc +index 9fecb1e1688f..6021be078090 100644 +--- a/src/librbd/internal.cc ++++ b/src/librbd/internal.cc +@@ -2110,7 +2110,9 @@ int mirror_image_disable_internal(ImageCtx *ictx, bool force, + // might have been blacklisted by peer -- ensure we still own + // the lock by pinging the OSD + int r = ictx->exclusive_lock->assert_header_locked(); +- if (r < 0) { ++ if (r == -EBUSY || r == -ENOENT) { ++ return 0; ++ } else if (r < 0) { + return r; + } + |