summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-mpath.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 5adede17ddf6..b759a127f9c3 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1261,6 +1261,20 @@ static void activate_path(struct work_struct *work)
1261 pg_init_done, pgpath); 1261 pg_init_done, pgpath);
1262} 1262}
1263 1263
1264static int noretry_error(int error)
1265{
1266 switch (error) {
1267 case -EOPNOTSUPP:
1268 case -EREMOTEIO:
1269 case -EILSEQ:
1270 case -ENODATA:
1271 return 1;
1272 }
1273
1274 /* Anything else could be a path failure, so should be retried */
1275 return 0;
1276}
1277
1264/* 1278/*
1265 * end_io handling 1279 * end_io handling
1266 */ 1280 */
@@ -1284,7 +1298,7 @@ static int do_end_io(struct multipath *m, struct request *clone,
1284 if (!error && !clone->errors) 1298 if (!error && !clone->errors)
1285 return 0; /* I/O complete */ 1299 return 0; /* I/O complete */
1286 1300
1287 if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ) 1301 if (noretry_error(error))
1288 return error; 1302 return error;
1289 1303
1290 if (mpio->pgpath) 1304 if (mpio->pgpath)