]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.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>
Mon, 9 Feb 2026 23:24:21 +0000 (00:24 +0100)
commit81eaf2e6bf3f55b8e21aac3e7a6ad42e935c0e91
treee80531e8a5fc493d09fa5566d0550902bee91863
parent1c4f472aaf44b9a2e06b4b6f0bfb0678d982b52b
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