- /* 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.