• L
    drbd: Send P_NEG_ACK upon write error in protocol != C · e1fbc4ca
    Lars Ellenberg 提交于
    In protocol != C, we forgot to send the P_NEG_ACK for failing writes.
    
    Once we no longer submit to local disk, because we already "detached",
    due to the typical "on-io-error detach;" config setting,
    we already send the neg acks right away.
    
    Only those requests that have been submitted,
    and have been error-completed by the local disk,
    would forget to send the neg-ack,
    and only in asynchronous replication (protocol != C).
    Unless this happened during resync,
    where we already always send acks, regardless of protocol.
    
    The primary side needs the P_NEG_ACK in order to mark
    the affected block(s) for resync in its out-of-sync bitmap.
    
    If the blocks in question are not re-written again,
    we may miss to resync them later, causing data inconsistencies.
    
    This patch will always send the neg-acks, and also at least try to
    persist the out-of-sync status on the local node already.
    Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
    Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
    Signed-off-by: NJens Axboe <axboe@kernel.dk>
    e1fbc4ca
drbd_worker.c 64.8 KB