Skip to contentSkip to conversation

dm mpath: do not fail path on -ENOSPC

PATCH In review Jun'ichi Nomura 2 participants 2 messages Sep 13, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dm mpath: do not fail path on -ENOSPC

Since ENOSPC is a target-side error, dm-mpath should just pass the error information to upper layer instead of retrying itself with path failover. Otherwise it will end up failing all paths down while path checkers find all paths ok.

ENOSPC can now be returned from SCSI device after commit a9d6ceb8 ("[SCSI] return ENOSPC on thin provisioning failure").

---
 drivers/md/dm-mpath.c | 1 +
 1 file changed, 1 insertion(+)

The patch is not actually tested as I don't have such a storage at my hand. Hannes, please let me know if you didn't change noretry_error() intentionally.

drivers/md/dm-mpath.c +1 -0
index b759a12..075747e 100644
@@ -1268,6 +1268,7 @@ static int noretry_error(int error)
 	case -EREMOTEIO:
 	case -EILSEQ:
 	case -ENODATA:
+	case -ENOSPC:
 		return 1;
 	}
 
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Jun'ichi Nomura

Since ENOSPC is a target-side error, dm-mpath should just pass the error information to upper layer instead of retrying itself with path failover. Otherwise it will end up failing all paths down while path checkers find all paths ok.

ENOSPC can now be returned from SCSI device after commit a9d6ceb8 ("[SCSI] return ENOSPC on thin provisioning failure").

Quoted 9 lines
---
 drivers/md/dm-mpath.c | 1 +
 1 file changed, 1 insertion(+)

The patch is not actually tested as I don't have such a storage at my hand. Hannes, please let me know if you didn't change noretry_error() intentionally.

No, you are correct. I've missed this bit when sending out the enhanced I/O errors patch.

drivers/md/dm-mpath.c static int noretry_error(int error) · line 1274

Quoted 13 lines
drivers/md/dm-mpath.c +1 -0
index b759a12..075747e 100644
@@ -1268,6 +1268,7 @@ static int noretry_error(int error)
 	case -EREMOTEIO:
 	case -EILSEQ:
 	case -ENODATA:
+	case -ENOSPC:
 		return 1;
 	}
 

Cheers,

Hannes

Signature · 8 lines
Dr. Hannes Reinecke		      zSeries & Storage
[email protected]			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html