On 6/12/23 09:50, mwilck@xxxxxxxx wrote:
scsi_device_block() is only called from scsi_target_block(), which calls it repeatedly for every child device. For targets with many devices, waiting for every queue to quiesce may cause a substantial delay (we measured more than 100s delay for blocking a FC rport with 2048 LUNs). Just call blk_mq_wait_quiesce_done() once from scsi_target_block() after stopping all queues.
Reviewed-by: Bart Van Assche <bvanassche@xxxxxxx>