• Lars Ellenberg's avatar
    drbd: don't forget error completion when "unsuspending" IO · 7bd000cb
    Lars Ellenberg authored
    Possibly sequence of events:
    SyncTarget is made Primary, then loses replication link
    (only path to good data on SyncSource).
    
    Behavior is then controlled by the on-no-data-accessible policy,
    which defaults to OND_IO_ERROR (may be set to OND_SUSPEND_IO).
    
    If OND_IO_ERROR is in fact the current policy, we clear the susp_fen
    (IO suspended due to fencing policy) flag, do NOT set the susp_nod
    (IO suspended due to no data) flag.
    
    But we forgot to call the IO error completion for all pending,
    suspended, requests.
    
    While at it, also add a race check for a theoretically possible
    race with a new handshake (network hickup), we may be able to
    re-send requests, and can avoid passing IO errors up the stack.
    Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: default avatarJens Axboe <axboe@fb.com>
    7bd000cb
drbd_nl.c 144 KB