From: Chandra Seetharaman <sekharan@us.ibm.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: "andmike@linux.vnet.ibm.com" <andmike@linux.vnet.ibm.com>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: RE: DM does not activate the paths if there are more than one path in path group during failover
Date: Tue, 11 Nov 2008 13:00:47 -0800 [thread overview]
Message-ID: <1226437247.8998.0.camel@chandra-ubuntu> (raw)
In-Reply-To: <E463DF2B2E584B4A82673F53D62C2EF45BE75B7F@cosmail01.lsi.com>
Will look into this problem and get back to you.
chandra
On Tue, 2008-11-11 at 10:13 -0700, Moger, Babu wrote:
> Thanks for the response.
>
> If pg_init is intended to be called only once then problem is elsewhere.
>
> During the pg_init, the activate_path is called. The activate_path calls scsi_dh_activate(then rdac_activate) which will set path state to active(h->state = RDAC_STATE_ACTIVE;). My understanding is, h->state is specific to each path. How does d-m sets h->state to RDAC_STATE_ACTIVE for all the paths available in the path group.
>
> This is what happening in my case. On path group failure, d-m switches the path group initiates path group. It then selects the first path (in the path group) starts I/O. After exhausting the repeat_count it then selects the next path in the path group. Then rdac_prep_fn is called. This function finds h->state is still passive and fails the path which becomes unusable.
>
> This function returns BLKPREP_KILL which is leading to fail failure.
>
> static int rdac_prep_fn(struct scsi_device *sdev, struct request *req)
> {
> struct rdac_dh_data *h = get_rdac_data(sdev);
> int ret = BLKPREP_OK;
>
> if (h->state != RDAC_STATE_ACTIVE) {
> ret = BLKPREP_KILL;
> req->cmd_flags |= REQ_QUIET;
> }
> return ret;
> }
>
> This is my understanding so far. Please correct me if there is anything wrong.
>
>
> -----Original Message-----
> From: dm-devel-bounces@redhat.com [mailto:dm-devel-bounces@redhat.com] On Behalf Of Alasdair G Kergon
> Sent: Monday, November 10, 2008 6:59 PM
> To: device-mapper development
> Cc: andmike@linux.vnet.ibm.com; linux-scsi@vger.kernel.org
> Subject: Re: [dm-devel] DM does not activate the paths if there are more than one path in path group during failover
>
> pg_init is a function intended to be called *once* when there is a switch to a new group of paths. It is not per-path initialisation.
>
> Alasdair
> --
> agk@redhat.com
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2008-11-11 21:00 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-06 4:05 [PATCH] Make sure the state of a path is set properly when controller is swapped from passive to active Chandra Seetharaman
2008-11-10 23:17 ` [PATCH] scsi_dh: Adding LSI vendor and product ids in rdac device list Moger, Babu
2008-11-24 0:04 ` James Bottomley
2008-11-24 15:06 ` Moger, Babu
2008-11-11 0:45 ` DM does not activate the paths if there are more than one path in path group during failover Moger, Babu
2008-11-11 0:59 ` Alasdair G Kergon
2008-11-11 17:13 ` Moger, Babu
2008-11-11 21:00 ` Chandra Seetharaman [this message]
2008-11-13 23:48 ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: [dm-devel] DM does not activate the paths if there are more than one path in path group during failover") Chandra Seetharaman
2008-11-14 0:12 ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: " Alasdair G Kergon
2008-11-14 19:08 ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: [dm-devel] " Chandra Seetharaman
2008-11-14 19:34 ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: " Alasdair G Kergon
2008-11-14 20:24 ` [RFC][PATCH] Handle multipath paths in a path group properly during pg_init (was "RE: [dm-devel] " Chandra Seetharaman
2008-11-11 2:06 ` DM does not activate the paths if there are more than one path in path group during failover Chandra Seetharaman
2008-11-11 17:07 ` Moger, Babu
2008-11-11 17:10 ` Chandra Seetharaman
2008-11-11 17:28 ` Moger, Babu
2009-01-22 0:00 ` qla2xxx 0000:03:0c.0: Firmware image unavailable Moger, Babu
2009-01-22 0:26 ` Seokmann Ju
2009-01-22 14:14 ` Moger, Babu
2009-01-22 14:39 ` Sudhakar Pannerselvam
2009-01-22 15:20 ` Moger, Babu
2009-01-22 16:46 ` Dave Holland
2009-01-23 0:15 ` [dm-devel] " Moger, Babu
2009-01-23 6:22 ` Sudhakar Pannerselvam
2009-01-23 15:04 ` James Bottomley
2009-01-25 4:22 ` Mike Snitzer
2009-01-22 14:56 ` James Bottomley
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=1226437247.8998.0.camel@chandra-ubuntu \
--to=sekharan@us.ibm.com \
--cc=andmike@linux.vnet.ibm.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