]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
librbd: prepare lock_acquire() for changing between policies
authorIlya Dryomov <idryomov@gmail.com>
Mon, 19 Jan 2026 16:43:41 +0000 (17:43 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 12 Feb 2026 17:04:09 +0000 (18:04 +0100)
commit047692467af7c8e3cce967e439f7b02faead2b2f
treed971ff6bca04510e1f55b4fea8422f865550c1ac
parent7c390bf2dc6fff3c1698121febf7a882aeaa864c
librbd: prepare lock_acquire() for changing between policies

In preparation for adding a new TransientPolicy, get rid of the check
implemented in terms of exclusive_lock::Policy::may_auto_request_lock()
that essentially makes it so that exclusive lock policy on a given
image handle can be changed from the default AutomaticPolicy only once.
In order to effect another change a new image handle would have been
needed which is pretty suboptimal.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 1f9396ff8208accdf334c088745d2734225b34c1)
src/librbd/internal.cc