• Xiubo Li's avatar
    scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes · a94a2572
    Xiubo Li authored
    Currently there is one cmd timeout timer and one qfull timer for each udev,
    and whenever any new command is coming in we will update the cmd timer or
    qfull timer. For some corner cases the timers are always working only for
    the ringbuffer's and full queue's newest cmd. That's to say the timer won't
    be fired even if one cmd has been stuck for a very long time and the
    deadline is reached.
    
    This fix will keep the cmd/qfull timers to be pended for the oldest cmd in
    ringbuffer and full queue, and will update them with the next cmd's
    deadline only when the old cmd's deadline is reached or removed from the
    ringbuffer and full queue.
    Signed-off-by: default avatarXiubo Li <xiubli@redhat.com>
    Acked-by: default avatarMike Christie <mchristi@redhat.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    a94a2572
target_core_user.c 69.1 KB