[0/5] limit set the host state by sysfs

Message ID 20230325011734.507453-1-yebin@huaweicloud.com
Headers
Series limit set the host state by sysfs |

Message

Ye Bin March 25, 2023, 1:17 a.m. UTC
  From: Ye Bin <yebin10@huawei.com>

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(-)