dm-mpath.c (b88efd43f900d608560211a18a38d450f8192948) | dm-mpath.c (8ff232c1a819c2e98d85974a3bff0b7b8e2970ed) |
---|---|
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> --- 1516 unchanged lines hidden (view full) --- 1525 scsi_dh_activate(q, pg_init_done, pgpath); 1526 else 1527 pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED); 1528} 1529 1530static int noretry_error(int error) 1531{ 1532 switch (error) { | 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> --- 1516 unchanged lines hidden (view full) --- 1525 scsi_dh_activate(q, pg_init_done, pgpath); 1526 else 1527 pg_init_done(pgpath, SCSI_DH_DEV_OFFLINED); 1528} 1529 1530static int noretry_error(int error) 1531{ 1532 switch (error) { |
1533 case -EBADE: 1534 /* 1535 * EBADE signals an reservation conflict. 1536 * We shouldn't fail the path here as we can communicate with 1537 * the target. We should failover to the next path, but in 1538 * doing so we might be causing a ping-pong between paths. 1539 * So just return the reservation conflict error. 1540 */ |
|
1533 case -EOPNOTSUPP: 1534 case -EREMOTEIO: 1535 case -EILSEQ: 1536 case -ENODATA: 1537 case -ENOSPC: 1538 return 1; 1539 } 1540 --- 28 unchanged lines hidden (view full) --- 1569 1570 if (mpio->pgpath) 1571 fail_path(mpio->pgpath); 1572 1573 if (!atomic_read(&m->nr_valid_paths)) { 1574 if (!test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) { 1575 if (!must_push_back_rq(m)) 1576 r = -EIO; | 1541 case -EOPNOTSUPP: 1542 case -EREMOTEIO: 1543 case -EILSEQ: 1544 case -ENODATA: 1545 case -ENOSPC: 1546 return 1; 1547 } 1548 --- 28 unchanged lines hidden (view full) --- 1577 1578 if (mpio->pgpath) 1579 fail_path(mpio->pgpath); 1580 1581 if (!atomic_read(&m->nr_valid_paths)) { 1582 if (!test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) { 1583 if (!must_push_back_rq(m)) 1584 r = -EIO; |
1577 } else { 1578 if (error == -EBADE) 1579 r = error; | |
1580 } 1581 } 1582 1583 return r; 1584} 1585 1586static int multipath_end_io(struct dm_target *ti, struct request *clone, 1587 int error, union map_info *map_context) --- 32 unchanged lines hidden (view full) --- 1620 if (mpio->pgpath) 1621 fail_path(mpio->pgpath); 1622 1623 if (!atomic_read(&m->nr_valid_paths)) { 1624 if (!test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) { 1625 if (!must_push_back_bio(m)) 1626 return -EIO; 1627 return DM_ENDIO_REQUEUE; | 1585 } 1586 } 1587 1588 return r; 1589} 1590 1591static int multipath_end_io(struct dm_target *ti, struct request *clone, 1592 int error, union map_info *map_context) --- 32 unchanged lines hidden (view full) --- 1625 if (mpio->pgpath) 1626 fail_path(mpio->pgpath); 1627 1628 if (!atomic_read(&m->nr_valid_paths)) { 1629 if (!test_bit(MPATHF_QUEUE_IF_NO_PATH, &m->flags)) { 1630 if (!must_push_back_bio(m)) 1631 return -EIO; 1632 return DM_ENDIO_REQUEUE; |
1628 } else { 1629 if (error == -EBADE) 1630 return error; | |
1631 } 1632 } 1633 1634 /* Queue for the daemon to resubmit */ 1635 dm_bio_restore(get_bio_details_from_bio(clone), clone); 1636 1637 spin_lock_irqsave(&m->lock, flags); 1638 bio_list_add(&m->queued_bios, clone); --- 498 unchanged lines hidden --- | 1633 } 1634 } 1635 1636 /* Queue for the daemon to resubmit */ 1637 dm_bio_restore(get_bio_details_from_bio(clone), clone); 1638 1639 spin_lock_irqsave(&m->lock, flags); 1640 bio_list_add(&m->queued_bios, clone); --- 498 unchanged lines hidden --- |