]> www.infradead.org Git - nvme.git/commit
drbd: do not block when adjusting "disk-options" while IO is frozen
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 20 Dec 2018 16:23:37 +0000 (17:23 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Dec 2018 16:51:30 +0000 (09:51 -0700)
commitf708bd08ecbdc23d03aaedf5b3311ebe44cfdb50
tree7596bad3868b3900bce55dfa4f0938dae538f594
parenta2823ea92024e6cb8124bf49a055261a8508a795
drbd: do not block when adjusting "disk-options" while IO is frozen

"suspending" IO is overloaded.
It can mean "do not allow new requests" (obviously),
but it also may mean "must not complete pending IO",
for example while the fencing handlers do their arbitration.

When adjusting disk options, we suspend io (disallow new requests), then
wait for the activity-log to become unused (drain all IO completions),
and possibly replace it with a new activity log of different size.

If the other "suspend IO" aspect is active, pending IO completions won't
happen, and we would block forever (unkillable drbdsetup process).

Fix this by skipping the activity log adjustment if the "al-extents"
setting did not change. Also, in case it did change, fail early without
blocking if it looks like we would block forever.

Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/drbd/drbd_nl.c