• Lars Ellenberg's avatar
    drbd: properly call drbd_rs_cancel_all() in drbd_disconnected() · 08332d73
    Lars Ellenberg authored
    drbd_disconnected() is supposed to clear the resync lru cache,
    by calling drbd_rs_cancel_all().
    
    We must do so before we call drbd_flush_workqueue(), as at least the
    callback w_restart_disk_io() may wait for resync progres, and would
    otherwise deadlock.
    
    drbd_finish_peer_reqs() may again populate that cache, which will
    then potentially be stale after the next resync handshake and bitmap
    exchange, we have to do it again after that.
    
    A stale resync lru cache causes no harm but ugly messages like this:
     BAD! sector=196608s enr=6 rs_left=-256 rs_failed=0 count=256 cstate=SyncTarget
    Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    08332d73
drbd_receiver.c 146 KB