]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: avoid generating ESHUTDOWN in ManagedLock
authorIlya Dryomov <idryomov@gmail.com>
Tue, 28 Mar 2023 18:03:05 +0000 (20:03 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 6 Apr 2023 15:08:11 +0000 (17:08 +0200)
commit2ddb228504b28af31004c13cb21971447794979e
treed97074b57824ff05397ef113c8dc4cd719575f50
parent314908c36f8762bd599a24a737e2e3f68f6a1026
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