• L
    drbd: don't send out P_BARRIER with stale information · 4eb9b3cb
    Lars Ellenberg 提交于
    We must only send P_BARRIER for epochs we actually sent P_DATA in.
    
    If we (re-)establish a connection, we reinitialized the
    send.current_epoch_nr, but forgot to reset send.current_epoch_writes.
    
    This could result in a spurious P_BARRIER with stale epoch information,
    and a disconnect/reconnect cycle once the then "unexpected"
    P_BARRIER_ACK is received:
      BAD! BarrierAck #28823 received, expected #28829!
    
    Introduce re_init_if_first_write() and maybe_send_barrier() helpers,
    and call them appropriately for read/write/set-out-of-sync requests.
    Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
    4eb9b3cb
drbd_worker.c 51.2 KB