]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
librbd: avoid failing IO with -ESHUTDOWN when disabling exclusive-lock 37581/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 7 Oct 2020 14:58:57 +0000 (10:58 -0400)
committerJason Dillaman <dillaman@redhat.com>
Wed, 7 Oct 2020 15:04:41 +0000 (11:04 -0400)
commitcb35c6c3bc60b1ed6e2133acf1fbd3a803502f5a
treeb2e9a43b26b46b953877ab535d5cbbbd34d4c95a
parentbefe3bc77af9e49ba04334ebccac0ba8b6eb8a18
librbd: avoid failing IO with -ESHUTDOWN when disabling exclusive-lock

When dynamically disabling the exclusive-lock feature with in-flight IO,
it was previously possible for IO to fail with -ESHUTDOWN when it
attempts to acquire the lock due to the PreReleaseRequest setting the
lock required flag. There is also the possibility for a race with the
first IO racing with exclusive-lock shutdown when the lock was not
already acquired.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/exclusive_lock/ImageDispatch.cc
src/librbd/exclusive_lock/PreReleaseRequest.cc
src/test/librbd/exclusive_lock/test_mock_PreReleaseRequest.cc