All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] scsi: remove devices in ALUA transitioning status
@ 2020-09-30  8:02 Hannes Reinecke
  2020-09-30  8:02 ` [PATCH 1/4] block: return status code in blk_mq_end_request() Hannes Reinecke
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Hannes Reinecke @ 2020-09-30  8:02 UTC (permalink / raw)
  To: Martin K. Petersen
  Cc: Christoph Hellwig, James Bottomley, linux-scsi, Hannes Reinecke

Hi all,

during testing we found that there is an issue with dev_loss_tmo and
devices in ALUA transitioning state.
What happens is that I/O gets requeued via BLK_STS_RESOURCE for these
devices, so when dev_loss_tmo triggers the SCSI core cannot flush the
request list as I/O is simply requeued.

So when the driver is trying to re-establish the device it'll wait for
that last reference to drop in order to re-attach the device, but as I/O
is still outstanding on the (old) device it'll wait for ever.

Fix this by returning 'BLK_STS_AGAIN' from scsi_dh_alua when the device
is in ALUA transitioning, and also set the 'transitioning' state when
scsi_dh_alua is receiving a sense code, and not only after scsi_dh_alua
successfully received the response to a REPORT TARGET PORT GROUPS
command.

Hannes Reinecke (4):
  block: return status code in blk_mq_end_request()
  scsi_dh_alua: return BLK_STS_AGAIN for ALUA transitioning state
  scsi_dh_alua: set 'transitioning' state on unit attention
  scsi: return BLK_STS_AGAIN for ALUA transitioning

 block/blk-mq.c                             |  2 +-
 drivers/scsi/device_handler/scsi_dh_alua.c | 10 +++++++++-
 drivers/scsi/scsi_lib.c                    |  8 ++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)

-- 
2.16.4


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

end of thread, other threads:[~2020-11-11  4:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30  8:02 [PATCH 0/4] scsi: remove devices in ALUA transitioning status Hannes Reinecke
2020-09-30  8:02 ` [PATCH 1/4] block: return status code in blk_mq_end_request() Hannes Reinecke
2020-09-30  8:02 ` [PATCH 2/4] scsi_dh_alua: return BLK_STS_AGAIN for ALUA transitioning state Hannes Reinecke
2020-10-01  2:44   ` Bart Van Assche
2020-10-01  9:58     ` Hannes Reinecke
2020-09-30  8:02 ` [PATCH 3/4] scsi_dh_alua: set 'transitioning' state on unit attention Hannes Reinecke
2020-09-30  8:02 ` [PATCH 4/4] scsi: return BLK_STS_AGAIN for ALUA transitioning Hannes Reinecke
2020-10-27  0:21 ` [PATCH 0/4] scsi: remove devices in ALUA transitioning status Martin K. Petersen
2020-11-07  0:02 ` Ewan D. Milne
2020-11-11  3:58   ` Martin K. Petersen

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.