]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: scsi_dh_alua: Properly handle the ALUA transitioning state
authorBrian Bunker <brian@purestorage.com>
Mon, 2 May 2022 15:09:17 +0000 (08:09 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 2 May 2022 23:52:13 +0000 (19:52 -0400)
commit8e171aaa743662fcda80f482dc6d368b111d4f53
tree5b4ea87874378bb44d3e9d3f2917b5757c5f1e77
parentb5b89629de7f4e6524cb3a2f3814d9366ae5b79f
scsi: scsi_dh_alua: Properly handle the ALUA transitioning state

The handling of the ALUA transitioning state is currently broken. When a
target goes into this state, it is expected that the target is allowed to
stay in this state for the implicit transition timeout without a path
failure. The handler has this logic, but it gets skipped currently.

When the target transitions, there is in-flight I/O from the initiator. The
first of these responses from the target will be a unit attention letting
the initiator know that the ALUA state has changed.  The remaining
in-flight I/Os, before the initiator finds out that the portal state has
changed, will return not ready, ALUA state is transitioning. The portal
state will change to SCSI_ACCESS_STATE_TRANSITIONING. This will lead to all
new I/O immediately failing the path unexpectedly. The path failure happens
in less than a second instead of the expected successes until the
transition timer is exceeded.

Allow I/Os to continue while the path is in the ALUA transitioning
state. The handler already takes care of a target that stays in the
transitioning state for too long by changing the state to ALUA state
standby once the transition timeout is exceeded at which point the path
will fail.

Link: https://lore.kernel.org/r/CAHZQxy+4sTPz9+pY3=7VJH+CLUJsDct81KtnR2be8ycN5mhqTg@mail.gmail.com
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Krishna Kant <krishna.kant@purestorage.com>
Acked-by: Seamus Connor <sconnor@purestorage.com>
Signed-off-by: Brian Bunker <brian@purestorage.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/device_handler/scsi_dh_alua.c