From: Ye Bin <yebin10@xxxxxxxxxx> Now, we can set the host state by sysfs with any value. Actually, it doesn't make sense. May cause some functional issues. This patchset introduce 'blocked' state to blocking IO, we can use this state for testing. Perhaps we can use this to do some fault recovery or firmware upgrades, as long as the driver support is good, it may be insensitive to the upper layer. Ye Bin (5): scsi: fix switch host state race between by sysfs and others scsi: introduce SHOST_BLOCKED state to support blocking IO scsi: limit to set the host state scsi: blocking IO when host is blocked scsi: run queue after set host state from blocked to running drivers/scsi/hosts.c | 11 +++++++++++ drivers/scsi/scsi_lib.c | 4 ++++ drivers/scsi/scsi_sysfs.c | 18 +++++++++++++++++- include/scsi/scsi_host.h | 6 ++++++ 4 files changed, 38 insertions(+), 1 deletion(-) -- 2.31.1