• Jing Huang's avatar
    [SCSI] bfa: fix possible IO double completion · 56d218fc
    Jing Huang authored
    While processing the ioim in callback functions, the ioim is still in io_q.
    During this time, if the itnim goes offline, the ioim is requeued from
    itnim->io_q into itnim->delay_comp_q although the request is already completed.
    This results in requeing the ioim into the callback queue if the ioim is not
    freed by the time the ioim is requeued. This results in double completion of
    the ioim. To fix this, whenever a response is received from firmware for an
    ioim, deque it from io_q and enque to fcpim->comp_q. This will eliminate any
    possibility of itnim picking any ioim for which the response is already
    received.
    Signed-off-by: default avatarJing Huang <huangj@brocade.com>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
    56d218fc
bfa_ioim.c 32.4 KB