dm-mpath: Add MP_RETRY_PG_INIT flag for hw handlers to tell dm-mpath to retry pg_init.
PATCH 1/1 dm-mpath: Add MP_RETRY_PG_INIT flag for hw handlers to tell dm-mpath to retry pg_init.
Add MP_RETRY_PG_INIT flag for hw handlers to tell dm-mpath to retry pg_init. 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.
drivers/md/dm-hw-handler.h +1 -0
@@ -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
drivers/md/dm-mpath.c +3 -1
@@ -999,7 +999,9 @@ void dm_pg_init_complete(struct dm_pathbypass_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)