]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: scsi_debug: delay stress fix
authorDouglas Gilbert <dgilbert@interlog.com>
Wed, 10 Jan 2018 21:57:31 +0000 (16:57 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 17 Jan 2018 06:00:05 +0000 (01:00 -0500)
commit10bde980ac18da7859591f3a30ddac881f83a2cf
treee799b486574ce176b7238012543d1d30d6b59fd7
parentdbc1ebe7b0fd43f7d74ba0e87b411eb48c9fdeb2
scsi: scsi_debug: delay stress fix

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: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_debug.c