Skip to contentSkip to conversation

scsi: handle ABORTED_COMMAND on Fujitsu ETERNUS

PATCH In review Martin Wilck 4 participants 6 messages Jan 15, 2018 – Jan 18, 2018 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scsi: handle ABORTED_COMMAND on Fujitsu ETERNUS

On Fujitsu ETERNUS systems, sense code ABORTED COMMAND with ASC/Q C1/01 is used to indicate temporary condition where the storage-internal path to a target is switched from one controller to another. SCSI commands that return with this error code must be retried unconditionally (i.e. without the "maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV commands.

---
 drivers/scsi/scsi_error.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/scsi/scsi_error.c +10 -0
index d042915ce895..598111a741d4 100644
@@ -518,6 +518,16 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
 		if (sshdr.asc == 0x10) /* DIF */
 			return SUCCESS;
 
+		if (!strncmp(scmd->device->vendor, "FUJITSU", 7) &&
+			   !strncmp(scmd->device->model, "ETERNUS_DXM", 11) &&
+			   (sshdr.asc == 0xc1) && (sshdr.ascq == 0x1)) {
+			/*
+			 * Fujitsu Eternus uses this vendor specific code
+			 * to indicate an internal reconfiguration status
+			 * which can be recovered with a retry.
+			 */
+			return ADD_TO_MLQUEUE;
+		}
 		return NEEDS_RETRY;
 	case NOT_READY:
 	case UNIT_ATTENTION:
Signature · 1 line
2.15.1
#1 lore raw

Martin,

drivers/scsi/scsi_error.c int scsi_check_sense(struct scsi_cmnd *scmd) · line 522

Quoted 2 lines
drivers/scsi/scsi_error.c +2 -0
+		if (!strncmp(scmd->device->vendor, "FUJITSU", 7) &&
+			   !strncmp(scmd->device->model, "ETERNUS_DXM", 11) &&

Blacklist, please.

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#2 lore raw
Quoted 9 lines · Martin K. Petersen

Martin,

Quoted 4 lines
(quoted diff) +1 -0
+		if (!strncmp(scmd->device->vendor, "FUJITSU", 7)

&&

(quoted diff) +1 -0
+			   !strncmp(scmd->device->model,

"ETERNUS_DXM", 11) &&

Blacklist, please.

To make sure I understand correctly:

You'd like to spend a precious BLIST bit for this single device which uses vendor-specific ASC/Q?

Regards,
Martin

Signature · 3 lines
Dr. Martin Wilck <[email protected]>, Tel. +49 (0)911 74053 2107
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
#3 lore raw

Martin,

Quoted 2 lines

You'd like to spend a precious BLIST bit for this single device which uses vendor-specific ASC/Q?

I really don't want string comparisons in the regular code paths. Also not a fan of vendor-specific ASCs. But if you must use them, please add a flag and trigger on that.

Since this is a bit of an unusual check condition combo, we could entertain whether we should simply always ADD_TO_MLQUEUE on 0xb/0xc1/0x1. I wonder what would break?

Signature · 1 line
Martin K. Petersen	Oracle Linux Engineering
#4 lore raw
Quoted 6 lines · Martin K. Petersen

Martin,

Quoted 2 lines

You'd like to spend a precious BLIST bit for this single device which uses vendor-specific ASC/Q?

Quoted 8 lines

I really don't want string comparisons in the regular code paths. Also not a fan of vendor-specific ASCs. But if you must use them, please add a flag and trigger on that.

Since this is a bit of an unusual check condition combo, we could entertain whether we should simply always ADD_TO_MLQUEUE on 0xb/0xc1/0x1. I wonder what would break?

That's the usual problem I have with vendor-specific sense codes. In general the risk is quite low of different vendors actually using the same code; I guess we can get away with just adding a debug message here and enable it without any vendor check.
Then we can reconsider the whole thing once we notice several vendors using the same sense codes.

Cheers,

Hannes

Signature · 5 lines
Dr. Hannes Reinecke		   Teamlead Storage & Networking
[email protected]			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
#5 lore raw
Quoted 17 lines · Hannes Reinecke
Quoted 8 lines · Martin K. Petersen

Martin,

Quoted 3 lines

You'd like to spend a precious BLIST bit for this single device which uses vendor-specific ASC/Q?

Quoted 8 lines

I really don't want string comparisons in the regular code paths. Also not a fan of vendor-specific ASCs. But if you must use them, please add a flag and trigger on that.

Since this is a bit of an unusual check condition combo, we could entertain whether we should simply always ADD_TO_MLQUEUE on 0xb/0xc1/0x1. I wonder what would break?

Quoted 6 lines

That's the usual problem I have with vendor-specific sense codes. In general the risk is quite low of different vendors actually using the same code; I guess we can get away with just adding a debug message here and enable it without any vendor check.
Then we can reconsider the whole thing once we notice several vendors using the same sense codes.

Murphy's law says that if we rely on Vendors to chose non-overlapping numbers we'll end up with a clash fairly quickly ...

Can't we find a way of doing this in the device_handler?  That way we can use vendor specific codes only when we know who the vendor is?

James