dm-mpath.c (4ba25a496f62129a2ad8c2436ab2b402752dc66c) dm-mpath.c (cc9d3c382bc1674884c2e5e468d51230a9503dee)
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include <linux/device-mapper.h>

--- 1247 unchanged lines hidden (view full) ---

1256{
1257 struct pgpath *pgpath =
1258 container_of(work, struct pgpath, activate_path.work);
1259
1260 scsi_dh_activate(bdev_get_queue(pgpath->path.dev->bdev),
1261 pg_init_done, pgpath);
1262}
1263
1/*
2 * Copyright (C) 2003 Sistina Software Limited.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
4 *
5 * This file is released under the GPL.
6 */
7
8#include <linux/device-mapper.h>

--- 1247 unchanged lines hidden (view full) ---

1256{
1257 struct pgpath *pgpath =
1258 container_of(work, struct pgpath, activate_path.work);
1259
1260 scsi_dh_activate(bdev_get_queue(pgpath->path.dev->bdev),
1261 pg_init_done, pgpath);
1262}
1263
1264static int noretry_error(int error)
1265{
1266 switch (error) {
1267 case -EOPNOTSUPP:
1268 case -EREMOTEIO:
1269 case -EILSEQ:
1270 case -ENODATA:
1271 case -ENOSPC:
1272 return 1;
1273 }
1274
1275 /* Anything else could be a path failure, so should be retried */
1276 return 0;
1277}
1278
1264/*
1265 * end_io handling
1266 */
1267static int do_end_io(struct multipath *m, struct request *clone,
1268 int error, struct dm_mpath_io *mpio)
1269{
1270 /*
1271 * We don't queue any clone request inside the multipath target

--- 7 unchanged lines hidden (view full) ---

1279 * clone bios for it and resubmit it later.
1280 */
1281 int r = DM_ENDIO_REQUEUE;
1282 unsigned long flags;
1283
1284 if (!error && !clone->errors)
1285 return 0; /* I/O complete */
1286
1279/*
1280 * end_io handling
1281 */
1282static int do_end_io(struct multipath *m, struct request *clone,
1283 int error, struct dm_mpath_io *mpio)
1284{
1285 /*
1286 * We don't queue any clone request inside the multipath target

--- 7 unchanged lines hidden (view full) ---

1294 * clone bios for it and resubmit it later.
1295 */
1296 int r = DM_ENDIO_REQUEUE;
1297 unsigned long flags;
1298
1299 if (!error && !clone->errors)
1300 return 0; /* I/O complete */
1301
1287 if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ)
1302 if (noretry_error(error))
1288 return error;
1289
1290 if (mpio->pgpath)
1291 fail_path(mpio->pgpath);
1292
1293 spin_lock_irqsave(&m->lock, flags);
1294 if (!m->nr_valid_paths) {
1295 if (!m->queue_if_no_path) {

--- 475 unchanged lines hidden ---
1303 return error;
1304
1305 if (mpio->pgpath)
1306 fail_path(mpio->pgpath);
1307
1308 spin_lock_irqsave(&m->lock, flags);
1309 if (!m->nr_valid_paths) {
1310 if (!m->queue_if_no_path) {

--- 475 unchanged lines hidden ---