]> 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>
Tue, 20 Jan 2026 00:13:21 +0000 (01:13 +0100)
commit1f9396ff8208accdf334c088745d2734225b34c1
tree447d6250920269873cfd1993642a998c57ab6f5a
parentff89abf5ddcca91c34cfd46d288d41fe93ec38b0
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>
src/librbd/internal.cc