On 1/19/19 2:04 AM, Christoph Hellwig wrote:
+ /* Check whether all requests have finished. */
+ blk_freeze_queue_start(q);
+ time_left = blk_mq_freeze_queue_wait_timeout(q, 1 * HZ);
+ blk_mq_unfreeze_queue(q);
+ return time_left > 0 ? SUCCESS : FAILED;
This is entirely generic SCSI/block evel functionality. I'd rather have
a new WAIT_FOR_FREEZE return value from ->eh_device_reset_handler and
handle this in the SCSI midlayer.
Hi Christoph,
Since a SCSI device must only reply to a reset task management function
after all affected commands have completed, the only case in which that
wait code is useful is if a regular reply is sent concurrently with the
SCSI reset reply and the two replies get reordered. Since the SCSI error
handler is able to deal with pending commands after a device reset, how
about leaving out the queue freeze / unfreeze code?
Thanks,
Bart.