• Lars Ellenberg's avatar
    drbd: do not block when adjusting "disk-options" while IO is frozen · f708bd08
    Lars Ellenberg authored
    "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: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    f708bd08
drbd_nl.c 147 KB