• Mike Christie's avatar
    [SCSI] libiscsi regression in 2.6.25: fix nop timer handling · 4cf10435
    Mike Christie authored
    The following patch fixes a bug in the iscsi nop processing.
    The target sends iscsi nops to ping the initiator and the
    initiator has to send nops to reply and can send nops to
    ping the target.
    
    In 2.6.25 we moved the nop processing to the kernel to handle
    problems when the userspace daemon is not up, but the target
    is pinging us, and to handle when scsi commands timeout, but
    the transport may be the cause (we can send a nop to check
    the transport). When we added this code we added a bug where
    if the transport timer wakes at the exact same time we are supposed to check
    for a nop timeout we drop the session instead of checking the transport.
    
    This patch checks if a iscsi ping is outstanding and if the ping has
    timed out, to determine if we need to signal a connection problem.
    Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
    Cc: Stable Tree <stable@kernel.org>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
    4cf10435
libiscsi.c 68.2 KB