dm-mpath.c (ee3e542fec6e69bc9fb668698889a37d93950ddf) dm-mpath.c (7e782af57649f8a8e943d80104c946a5cd7af7cc)
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 return 1;
1272 }
1273
1274 /* Anything else could be a path failure, so should be retried */
1275 return 0;
1276}
1277
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
1278/*
1279 * end_io handling
1280 */
1281static int do_end_io(struct multipath *m, struct request *clone,
1282 int error, struct dm_mpath_io *mpio)
1283{
1284 /*
1285 * We don't queue any clone request inside the multipath target

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

1293 * clone bios for it and resubmit it later.
1294 */
1295 int r = DM_ENDIO_REQUEUE;
1296 unsigned long flags;
1297
1298 if (!error && !clone->errors)
1299 return 0; /* I/O complete */
1300
1287 if (error == -EOPNOTSUPP || error == -EREMOTEIO || error == -EILSEQ)
1301 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 ---
1302 return error;
1303
1304 if (mpio->pgpath)
1305 fail_path(mpio->pgpath);
1306
1307 spin_lock_irqsave(&m->lock, flags);
1308 if (!m->nr_valid_paths) {
1309 if (!m->queue_if_no_path) {

--- 475 unchanged lines hidden ---