I/O errors for ALUA state transitions
PATCH 1/1 I/O errors for ALUA state transitions
From: Rajashekhar M A <[email protected]>
When a host is configured with a few LUNs and IO is running, injecting FC faults repeatedly leads to path recovery problems. The LUNs have 4 paths each and 3 of them come back active after say an FC fault which makes two of the paths go down, instead of all 4. This happens after several iterations of continuous FC faults.
Reason here is that we're returning an I/O error whenever we're encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION) instead of retrying.
--- drivers/scsi/scsi_error.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/scsi/scsi_error.c +4 -3
@@ -594,10 +594,11 @@ enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) sshdr.asc == 0x3f && sshdr.ascq == 0x0e)return NEEDS_RETRY ;/* -* if the device is in the process of becoming ready, we -* should retry. +* if the device is in the process of becoming ready, or +* transitions between ALUA states, we should retry. */ -if ((sshdr.asc ==0x04 ) && (sshdr.ascq ==0x01 )) +if ((sshdr.asc ==0x04 ) && + (sshdr.ascq ==0x01 || sshdr.ascq ==0x0a ))return NEEDS_RETRY ;/* * if the device is not started, we need to wake
Signature · 1 line
2.29.2
Quoted 23 lines · Hannes Reinecke
From: Rajashekhar M A <[email protected]>
When a host is configured with a few LUNs and IO is running, injecting FC faults repeatedly leads to path recovery problems. The LUNs have 4 paths each and 3 of them come back active after say an FC fault which makes two of the paths go down, instead of all 4. This happens after several iterations of continuous FC faults.
Reason here is that we're returning an I/O error whenever we're encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION) instead of retrying.
Quoted 1 line
Signed-off-by Hannes Reinecke <[email protected]>--- drivers/scsi/scsi_error.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/scsi/scsi_error.c +0
-0@@ -594,10 +594,11 @@ enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) sshdr.asc == 0x3f && sshdr.ascq == 0x0e)return NEEDS_RETRY ;
drivers/scsi/scsi_error.c enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) · line 602
Quoted 10 lines
drivers/scsi/scsi_error.c +4
-3/* -* if the device is in the process of becoming ready, we -* should retry. +* if the device is in the process of becoming ready, or +* transitions between ALUA states, we should retry. */ -if ((sshdr.asc ==0x04 ) && (sshdr.ascq ==0x01 )) +if ((sshdr.asc ==0x04 ) && + (sshdr.ascq ==0x01 || sshdr.ascq ==0x0a ))return NEEDS_RETRY ;
Why put this here instead of in alua_check_sense with the other ALUA state transition check?
Quoted 29 lines · On 9/7/21 5:59 PM, [email protected] wrote:
Quoted 28 lines · Hannes Reinecke
From: Rajashekhar M A <[email protected]>
When a host is configured with a few LUNs and IO is running, injecting FC faults repeatedly leads to path recovery problems. The LUNs have 4 paths each and 3 of them come back active after say an FC fault which makes two of the paths go down, instead of all 4. This happens after several iterations of continuous FC faults.
Reason here is that we're returning an I/O error whenever we're encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION) instead of retrying.
Quoted 1 line
Signed-off-by Hannes Reinecke <[email protected]>--- drivers/scsi/scsi_error.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/scsi/scsi_error.c +2
-2@@ -594,10 +594,11 @@ enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) sshdr.asc == 0x3f && sshdr.ascq == 0x0e)return NEEDS_RETRY ;/* -* if the device is in the process of becoming ready, we -* should retry. +* if the device is in the process of becoming ready, or +* transitions between ALUA states, we should retry.
Quoted 9 lines
drivers/scsi/scsi_error.c enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) · line 602
Quoted 5 lines
drivers/scsi/scsi_error.c +2
-1*/ -if ((sshdr.asc ==0x04 ) && (sshdr.ascq ==0x01 )) +if ((sshdr.asc ==0x04 ) && + (sshdr.ascq ==0x01 || sshdr.ascq ==0x0a ))return NEEDS_RETRY ;Why put this here instead of in
alua_check_sensewith the other ALUA state transition check?
Good point. Will be updating the patch.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
alua_check_sense() checks for NOT READY / 04h 0Ah but not UNIT ATTENTION with the same ASC/ASCQ.
Careful about updating pg->state in this case though because that may cause subsequent I/O in the probe to fail, we didn't do this before and we *may* only get the UA once.
-Ewan
Quoted 51 lines · Hannes Reinecke
Quoted 29 lines · On 9/7/21 5:59 PM, [email protected] wrote:
Quoted 28 lines · Hannes Reinecke
From: Rajashekhar M A <[email protected]>
When a host is configured with a few LUNs and IO is running, injecting FC faults repeatedly leads to path recovery problems. The LUNs have 4 paths each and 3 of them come back active after say an FC fault which makes two of the paths go down, instead of all 4. This happens after several iterations of continuous FC faults.
Reason here is that we're returning an I/O error whenever we're encountering sense code 06/04/0a (LOGICAL UNIT NOT ACCESSIBLE, ASYMMETRIC ACCESS STATE TRANSITION) instead of retrying.
Quoted 1 line
Signed-off-by Hannes Reinecke <[email protected]>--- drivers/scsi/scsi_error.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)drivers/scsi/scsi_error.c +2
-2@@ -594,10 +594,11 @@ enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) sshdr.asc == 0x3f && sshdr.ascq == 0x0e)return NEEDS_RETRY ;/* -* if the device is in the process of becoming ready, we -* should retry. +* if the device is in the process of becoming ready, or +* transitions between ALUA states, we should retry. Quoted 9 lines
drivers/scsi/scsi_error.c enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd) · line 602
Quoted 5 lines
drivers/scsi/scsi_error.c +2
-1*/ -if ((sshdr.asc ==0x04 ) && (sshdr.ascq ==0x01 )) +if ((sshdr.asc ==0x04 ) && + (sshdr.ascq ==0x01 || sshdr.ascq ==0x0a ))return NEEDS_RETRY ;Why put this here instead of in
alua_check_sensewith the other ALUA state transition check?Good point. Will be updating the patch.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
[email protected] +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer