• Lars Ellenberg's avatar
    drbd: fix "endless" transfer log walk in protocol A · f85d9f2d
    Lars Ellenberg authored
    Don't remember a DRBD request as ack_pending, if it is not.
    
    In protocol A, we usually clear RQ_NET_PENDING at the same time we set
    RQ_NET_SENT, so when deciding to remember it as ack_pending,
    mod_rq_state needs to look at the current request state,
    not at the previous state before the current modification was applied.
    
    This should prevent advance_conn_req_ack_pending() from walking the full
    transfer log just to find NULL in protocol A, which would cause serious
    performance degradation with many "in-flight" requests, e.g. when
    working via DRBD-proxy, or with a huge bandwidth-delay product.
    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>
    f85d9f2d
drbd_req.c 53.4 KB