]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: avoid generating ESHUTDOWN in ManagedLock 50630/head
authorIlya Dryomov <idryomov@gmail.com>
Tue, 28 Mar 2023 18:03:05 +0000 (20:03 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 4 Apr 2023 15:58:36 +0000 (17:58 +0200)
commit76856d90e0e0d73276c06a724091197301f982e9
tree46c3a2ad328aa094909703e9577ab1b1a9c79686
parent1d943f8c47b3510e47d40701e9acd213706754e5
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>
src/librbd/ManagedLock.cc
src/librbd/exclusive_lock/ImageDispatch.cc
src/test/librbd/test_internal.cc
src/test/librbd/test_mock_ManagedLock.cc