]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: avoid generating ESHUTDOWN in ManagedLock 50920/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 28 Mar 2023 18:03:05 +0000 (20:03 +0200)
committerChristopher Hoffman <choffman@redhat.com>
Thu, 6 Apr 2023 15:21:51 +0000 (15:21 +0000)
commitda713ed89436406ee52397df162b188688b197f5
tree7bc263d1f2034bff13365b832d606c75a9f6fe83
parentdd44afbe47319716f9e17e61e306d000f299acdd
librbd: avoid generating ESHUTDOWN in ManagedLock

EBLOCKLISTED has a very special meaning but happens to be an alias for
ESHUTDOWN.  If the client gets blocklisted, we always want to propagate
EBLOCKLISTED error code since it's generated by the OSD.

For ManagedLock use case of indicating that an operation on the lock
raced with lock shut down, meaning that a higher level request can just
be restarted, ERESTART should do.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 76856d90e0e0d73276c06a724091197301f982e9)
src/librbd/ManagedLock.cc
src/librbd/exclusive_lock/ImageDispatch.cc
src/test/librbd/test_internal.cc
src/test/librbd/test_mock_ManagedLock.cc