• Josef Bacik's avatar
    nbd: handle unexpected replies better · 8f3ea359
    Josef Bacik authored
    If the server or network is misbehaving and we get an unexpected reply
    we can sometimes miss the request not being started and wait on a
    request and never get a response, or even double complete the same
    request.  Fix this by replacing the send_complete completion with just a
    per command lock.  Add a per command cookie as well so that we can know
    if we're getting a double completion for a previous event.  Also check
    to make sure we dont have REQUEUED set as that means we raced with the
    timeout handler and need to just let the retry occur.
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
    8f3ea359
nbd.c 56.1 KB