aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-hw-handler.h
diff options
context:
space:
mode:
authorDave Wysochanski <dwysocha@redhat.com>2007-10-19 17:47:53 -0400
committerAlasdair G Kergon <agk@redhat.com>2007-10-19 21:01:18 -0400
commitc9e45581ad530cc1ca4b5d4add44a5b625234ada (patch)
tree3d5ddc7762e9c3d3da78f8c4d98047f3f108dd98 /drivers/md/dm-hw-handler.h
parent636d5786c45414fd8e48f2a2325be072274fdba4 (diff)
dm mpath: add retry pg init
This patch allows a failed path group initialisation command to be retried. It adds a generic MP_RETRY flag and a "pg_init_retries" feature to device-mapper multipath which limits the number of retries. 1. A hw handler sends a path initialization command to the storage and the command completes with an error code indicating the command should be retried. 2. The hardware handler calls dm_pg_init_complete() with MP_RETRY set in err_flags to ask the dm multipath core to retry. 3. If the retry limit has not been exceeded, pg_init() is retried. Otherwise fail_path() is called. If you are using the userspace multipath-tools or device-mapper-multipath package, you can set pg_init_retries in the 'device' section of your /etc/multipath.conf file. For example: features "2 pg_init_retries 7" The number of PG retries attempted is reported in the 'dmsetup status' output. Signed-off-by: Dave Wysochanski <dwysocha@redhat.com> Acked-by: Mike Christie <michaelc@cs.wisc.edu> Acked-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-hw-handler.h')
-rw-r--r--drivers/md/dm-hw-handler.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-hw-handler.h b/drivers/md/dm-hw-handler.h
index e0832e6fcf36..46809dcb121a 100644
--- a/drivers/md/dm-hw-handler.h
+++ b/drivers/md/dm-hw-handler.h
@@ -58,5 +58,6 @@ unsigned dm_scsi_err_handler(struct hw_handler *hwh, struct bio *bio);
58#define MP_FAIL_PATH 1 58#define MP_FAIL_PATH 1
59#define MP_BYPASS_PG 2 59#define MP_BYPASS_PG 2
60#define MP_ERROR_IO 4 /* Don't retry this I/O */ 60#define MP_ERROR_IO 4 /* Don't retry this I/O */
61#define MP_RETRY 8
61 62
62#endif 63#endif