[patch 2/3] Add MP_RETRY_PG_INIT flag for hw handlers to tell dm-mpath to retry pg_init.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Useful for cases where a hw handler sends a path initialization command to
the storage and it completes with an error code indicating the command should
be retried.

Signed-off-by: Dave Wysochanski <dave.wysochanski@xxxxxxxxxx>
Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx>

--
Index: linux-2.6.22-rc1/drivers/md/dm-hw-handler.h
===================================================================
--- linux-2.6.22-rc1.orig/drivers/md/dm-hw-handler.h
+++ linux-2.6.22-rc1/drivers/md/dm-hw-handler.h
@@ -58,5 +58,6 @@ unsigned dm_scsi_err_handler(struct hw_h
 #define MP_FAIL_PATH 1
 #define MP_BYPASS_PG 2
 #define MP_ERROR_IO  4	/* Don't retry this I/O */
+#define MP_RETRY_PG_INIT 8
 
 #endif
Index: linux-2.6.22-rc1/drivers/md/dm-mpath.c
===================================================================
--- linux-2.6.22-rc1.orig/drivers/md/dm-mpath.c
+++ linux-2.6.22-rc1/drivers/md/dm-mpath.c
@@ -999,7 +999,9 @@ void dm_pg_init_complete(struct dm_path 
 		bypass_pg(m, pg, 1);
 
 	spin_lock_irqsave(&m->lock, flags);
-	if (err_flags) {
+	if (err_flags & MP_RETRY_PG_INIT)
+		m->pg_init_required = 1;
+	else if (err_flags) {
 		m->current_pgpath = NULL;
 		m->current_pg = NULL;
 	} else if (!m->pg_init_required)

-- 

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux