• Douglas Gilbert's avatar
    scsi: scsi_debug: delay stress fix · 10bde980
    Douglas Gilbert authored
    Introduce a state enum into sdebug_defer objects to indicate which, if
    any, defer method has been used with the associated command.  Also add 2
    bools to indicate which of the defer methods has been initialized. Those
    objects are re-used but the initialization only needs to be done
    once. This simplifies command cancellation handling.
    
    Now the delay associated with a deferred response of a command cannot be
    changed (once started) by changing the delay (and ndelay) parameters in
    sysfs. Command aborts and driver shutdown are still honoured immediately
    when received.
    
    [mkp: applied by hand]
    Signed-off-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
    Reviewed-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
    Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
    10bde980
scsi_debug.c 172 KB