All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scsi: allow state transitions BLOCK -> BLOCK
@ 2020-07-02 14:24 Hannes Reinecke
  2020-07-02 14:34 ` James Bottomley
  0 siblings, 1 reply; 10+ messages in thread
From: Hannes Reinecke @ 2020-07-02 14:24 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, Bart van Assche, linux-scsi,
	Hannes Reinecke

scsi_transport_srp.c will call scsi_target_block() repeatedly
without calling scsi_target_unblock() first.
So allow the idempotent state transition BLOCK -> BLOCK to avoid
a warning here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/scsi_lib.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 1362f4f17dfd..55666e5ef151 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -2322,6 +2322,7 @@ scsi_device_set_state(struct scsi_device *sdev, enum scsi_device_state state)
 		switch (oldstate) {
 		case SDEV_RUNNING:
 		case SDEV_CREATED_BLOCK:
+		case SDEV_BLOCK:
 		case SDEV_QUIESCE:
 		case SDEV_OFFLINE:
 			break;
-- 
2.16.4


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-07-18  2:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-02 14:24 [PATCH] scsi: allow state transitions BLOCK -> BLOCK Hannes Reinecke
2020-07-02 14:34 ` James Bottomley
2020-07-02 15:14   ` Hannes Reinecke
2020-07-02 17:23     ` Bart Van Assche
2020-07-03  5:30       ` Hannes Reinecke
2020-07-06  2:30         ` Bart Van Assche
2020-07-06  6:22           ` Hannes Reinecke
2020-07-12  4:13             ` Bart Van Assche
2020-07-13  6:19               ` Hannes Reinecke
2020-07-18  2:51                 ` Bart Van Assche

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.