From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
To: "Moger, Babu" <Babu.Moger@lsi.com>
Cc: "'dm-devel@redhat.com'" <dm-devel@redhat.com>,
"Chauhan, Vijay" <Vijay.Chauhan@lsi.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] dm mpath: Try recover from I/O failure by re-initializing the PG if device is running on one path
Date: Tue, 21 Apr 2009 10:06:44 +0900 [thread overview]
Message-ID: <49ED1C24.9090303@ct.jp.nec.com> (raw)
In-Reply-To: <E463DF2B2E584B4A82673F53D62C2EF466A0E4DA@cosmail01.lsi.com>
Hi Babu,
On 2009/04/21 3:05 +0900, Moger, Babu wrote:
> This patch introduces the mechanism to recover from I/O failures by
> re-initializing the path if the device is running on only one path.
>
> Problem: Device mapper fails the path for every I/O error. It does not
> care about the type of error. There are certain errors which can be
> recovered by re-initializing the path again. I have seen this problem
> during my testing on rdac device handler. I have observed I/O errors
> when there is a change in Lun ownership. When Lun ownership changes
> device will return back with check condition with
> sense 0x05/0x94/0x01(SK/ASC/ASCQ -meaning Lun ownership changed).
> Currently, device mapper fails the path for this error and eventually
> this will lead to I/O error. We don't want to see I/O error for this reason.
Shouldn't we handle this type of device error inside device handler?
> The patch will set the flag pg_init_required if the device is running
> on single path. The process_queued_ios will re-initialize path if required.
> I have tested this patch on LSI rdac handler.
>
> Signed-off-by: Babu Moger <babu.moger@lsi.com>
> ---
>
> --- linux-2.6.30-rc2/drivers/md/dm-mpath.c.orig 2009-04-17 16:49:33.000000000 -0500
> +++ linux-2.6.30-rc2/drivers/md/dm-mpath.c 2009-04-17 17:09:51.000000000 -0500
> @@ -1152,6 +1152,15 @@ static int do_end_io(struct multipath *m
> return error;
>
> spin_lock_irqsave(&m->lock, flags);
> + /*
> + * If this is the only path left, then lets try to
> + * re-initialize the PG one last time..
> + */
> + if (m->nr_valid_paths == 1 && m->hw_handler_name) {
> + m->pg_init_required = 1;
> + spin_unlock_irqrestore(&m->lock, flags);
> + goto requeue;
> + }
> if (!m->nr_valid_paths) {
> if (__must_push_back(m)) {
> spin_unlock_irqrestore(&m->lock, flags);
What happens in case of a real I/O error (e.g. I/O to a broken sector)?
Is it correctly handled and returned to upper layer at last?
I'm asking that because the change looks dm retries such errors forever.
Or am I missing anything?
Thanks,
Kiyoshi Ueda
next prev parent reply other threads:[~2009-04-21 1:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-20 18:05 [PATCH] dm mpath: Try recover from I/O failure by re-initializing the PG if device is running on one path Moger, Babu
2009-04-21 1:06 ` Kiyoshi Ueda [this message]
2009-04-21 17:06 ` Moger, Babu
2009-04-22 1:52 ` Kiyoshi Ueda
2009-04-22 14:03 ` Moger, Babu
2009-04-22 17:33 ` Chandra Seetharaman
2009-04-22 17:43 ` Moger, Babu
2009-04-22 17:41 ` Grant Grundler
2009-04-22 18:16 ` Moger, Babu
2009-04-22 19:29 ` Chandra Seetharaman
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=49ED1C24.9090303@ct.jp.nec.com \
--to=k-ueda@ct.jp.nec.com \
--cc=Babu.Moger@lsi.com \
--cc=Vijay.Chauhan@lsi.com \
--cc=dm-devel@redhat.com \
--cc=linux-scsi@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox