Home
last modified time | relevance | path

Searched hist:"12 f3eef0" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/scsi/
H A Dscsi_debug.c12f3eef0 Mon Mar 27 02:43:08 CDT 2023 John Garry <john.g.garry@oracle.com> scsi: scsi_debug: Use scsi_host_busy() in delay_store() and ndelay_store()

The functions to update ndelay and delay value first check whether we have
any in-flight IO for any host. It does this by checking if any tag is used
in the global submit queues.

We can achieve the same by setting the host as blocked and then ensuring
that we have no in-flight commands with scsi_host_busy().

Note that scsi_host_busy() checks SCMD_STATE_INFLIGHT flag, which is only
set per command after we ensure that the host is not blocked, i.e. we see
more commands active after the check for scsi_host_busy() returns 0.

Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20230327074310.1862889-10-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>