]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
rbd: always kick acquire on "acquired" and "released" notifications
authorIlya Dryomov <idryomov@gmail.com>
Sat, 3 Jul 2021 09:56:55 +0000 (11:56 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 20 Sep 2021 16:49:40 +0000 (18:49 +0200)
commitc1dd4766a003c0e1f98e6504f97bf5553e6f2f58
tree4a0afb2cb509fe22ff7c9a27b36818551a96260b
parent58d091f8830ebe2da62ad084ad6069721648b365
rbd: always kick acquire on "acquired" and "released" notifications

BugLink: https://bugs.launchpad.net/bugs/1939899
commit 8798d070d416d18a75770fc19787e96705073f43 upstream.

Skipping the "lock has been released" notification if the lock owner
is not what we expect based on owner_cid can lead to I/O hangs.
One example is our own notifications: because owner_cid is cleared
in rbd_unlock(), when we get our own notification it is processed as
unexpected/duplicate and maybe_kick_acquire() isn't called.  If a peer
that requested the lock then doesn't go through with acquiring it,
I/O requests that came in while the lock was being quiesced would
be stalled until another I/O request is submitted and kicks acquire
from rbd_img_exclusive_lock().

This makes the comment in rbd_release_lock() actually true: prior to
this change the canceled work was being requeued in response to the
"lock has been acquired" notification from rbd_handle_acquired_lock().

Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Tested-by: Robin Geuze <robin.geuze@nl.team.blue>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/block/rbd.c