All of lore.kernel.org
 help / color / mirror / Atom feed
From: dwysocha@redhat.com
To: dm-devel@redhat.com
Subject: [patch 2/3] Add MP_RETRY_PG_INIT flag for hw handlers to tell dm-mpath to retry pg_init.
Date: Thu, 24 May 2007 01:24:04 -0400	[thread overview]
Message-ID: <20070524052419.595099764@redhat.com> (raw)
In-Reply-To: 20070524052402.946400092@redhat.com

[-- Attachment #1: dm-mpath-add-retry-pg-init.patch --]
[-- Type: text/plain, Size: 1113 bytes --]

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.

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)

-- 

  parent reply	other threads:[~2007-05-24  5:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-24  5:24 [patch 0/3] Add HP hardware handler support to dm-mp dwysocha
2007-05-24  5:24 ` [patch 1/3] Extremely basic hp hardware handler (no retries, no error handling, etc) dwysocha
2007-05-24  5:24 ` dwysocha [this message]
2007-05-24  5:24 ` [patch 3/3] Add retries to hp hardware handler when path activation command completes w/err dwysocha
  -- strict thread matches above, loose matches on Subject: below --
2007-05-24  5:17 [patch 0/3] Add HP hardware handler support to dm-mp dwysocha
2007-05-24  5:17 ` [patch 2/3] Add MP_RETRY_PG_INIT flag for hw handlers to tell dm-mpath to retry pg_init dwysocha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070524052419.595099764@redhat.com \
    --to=dwysocha@redhat.com \
    --cc=dm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.