From: Hannes Reinecke <hare@suse.de>
To: Chandra Seetharaman <sekharan@us.ibm.com>
Cc: michaelc@cs.wisc.edu, linux-scsi@vger.kernel.org,
dm-devel@redhat.com, Benoit_Arthur@emc.com,
Eddie.Williams@steeleye.com
Subject: Re: [PATCH 0/4] scsi_dh: Make scsi_dh_activate asynchronous
Date: Mon, 05 Oct 2009 16:35:26 +0200 [thread overview]
Message-ID: <4ACA042E.2000507@suse.de> (raw)
In-Reply-To: <4AC9EE1B.7030702@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]
Hannes Reinecke wrote:
[ .. ]
> However: The main reason why we're getting flooded with MODE SELECT
> commands
> is that the RDAC handler switches _each LUN_, not the entire controller.
> Seeing that the controller simply cannot cope with the resulting MODE
> SELECT
> flood wouldn't it be more sensible to switch the entire controller here?
>
> After all, we're trying to address a communication failure between the
> HBA and the controller, not a failure between the controller and the LUN.
> And by that reasoning switching individual LUNs is quite pointless as we
> have to switch _all_ LUNs handled by this controller eventually.
>
> So I would suggest to first issue a MODE SENSE command to check which LUNs
> are currently handled by this controller and then switch those LUNs in
> one go. This way we would be sending quite a few MODE SENSE commands,
> but I was under the impression that those do not have any restriction.
>
> I will see to draw up a patch.
>
Was easier than I thought. Patch is attached.
Note: Proof of concept only. No warranties.
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@suse.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)
[-- Attachment #2: rdac-transfer-all-luns --]
[-- Type: text/plain, Size: 1922 bytes --]
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c
index ec0ad84..6900115 100644
--- a/drivers/scsi/device_handler/scsi_dh_rdac.c
+++ b/drivers/scsi/device_handler/scsi_dh_rdac.c
@@ -42,6 +42,7 @@
/*
* Controller modes definitions
*/
+#define RDAC_MODE_TRANSFER_ALL_VISIBLE_LUNS 0x01
#define RDAC_MODE_TRANSFER_SPECIFIED_LUNS 0x02
/*
@@ -129,6 +130,7 @@ struct rdac_controller {
u8 subsys_id[SUBSYS_ID_LEN];
u8 slot_id[SLOT_ID_LEN];
int use_ms10;
+ int transfer_all_luns;
struct kref kref;
struct list_head node; /* list of all controllers */
union {
@@ -253,7 +255,8 @@ static struct request *rdac_failover_get(struct scsi_device *sdev,
rdac_pg->subpage_code = 0x1;
rdac_pg->page_len[0] = 0x01;
rdac_pg->page_len[1] = 0x28;
- rdac_pg->lun_table[h->lun] = 0x81;
+ if (!h->ctlr->transfer_all_luns)
+ rdac_pg->lun_table[h->lun] = 0x81;
} else {
struct rdac_pg_legacy *rdac_pg;
@@ -263,9 +266,13 @@ static struct request *rdac_failover_get(struct scsi_device *sdev,
common = &rdac_pg->common;
rdac_pg->page_code = RDAC_PAGE_CODE_REDUNDANT_CONTROLLER;
rdac_pg->page_len = 0x68;
- rdac_pg->lun_table[h->lun] = 0x81;
+ if (!h->ctlr->transfer_all_luns)
+ rdac_pg->lun_table[h->lun] = 0x81;
}
- common->rdac_mode[1] = RDAC_MODE_TRANSFER_SPECIFIED_LUNS;
+ if (h->ctlr->transfer_all_luns)
+ common->rdac_mode[1] = RDAC_MODE_TRANSFER_ALL_VISIBLE_LUNS;
+ else
+ common->rdac_mode[1] = RDAC_MODE_TRANSFER_SPECIFIED_LUNS;
common->quiescence_timeout = RDAC_QUIESCENCE_TIME;
common->rdac_options = RDAC_FORCED_QUIESENCE;
@@ -326,6 +333,7 @@ static struct rdac_controller *get_controller(u8 *subsys_id, u8 *slot_id)
memcpy(ctlr->slot_id, slot_id, SLOT_ID_LEN);
kref_init(&ctlr->kref);
ctlr->use_ms10 = -1;
+ ctlr->transfer_all_luns = 1;
list_add(&ctlr->node, &ctlr_list);
done:
spin_unlock(&list_lock);
[-- Attachment #3: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2009-10-05 14:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-30 2:08 [PATCH 0/4] scsi_dh: Make scsi_dh_activate asynchronous Chandra Seetharaman
2009-09-30 2:08 ` [PATCH 1/4] scsi_dh: Change the scsidh_activate interface to be asynchronous Chandra Seetharaman
2009-10-02 22:04 ` Moger, Babu
2009-10-02 22:36 ` Chandra Seetharaman
2009-10-02 23:02 ` Moger, Babu
2009-09-30 2:08 ` [PATCH 2/4] scsi_dh: rdac handler: Make rdac hardware handler async Chandra Seetharaman
2009-10-02 0:03 ` Moger, Babu
2009-10-02 0:29 ` Chandra Seetharaman
2009-09-30 2:08 ` [PATCH 3/4] scsi_dh: rdac handler: Make hp " Chandra Seetharaman
2009-09-30 2:08 ` [PATCH 4/4] scsi_dh: rdac handler: Make alua " Chandra Seetharaman
2009-10-01 4:19 ` [PATCH 0/4] scsi_dh: Make scsi_dh_activate asynchronous Moger, Babu
2009-10-01 20:54 ` Chandra Seetharaman
2009-10-05 13:01 ` Hannes Reinecke
2009-10-05 14:35 ` Hannes Reinecke [this message]
2009-10-05 23:25 ` Chandra Seetharaman
2009-10-06 8:08 ` Hannes Reinecke
2009-10-06 19:46 ` Moger, Babu
2009-10-07 23:08 ` Moger, Babu
2009-10-09 9:44 ` Hannes Reinecke
2009-10-09 14:06 ` Moger, Babu
2009-10-09 14:55 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2009-10-21 16:22 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=4ACA042E.2000507@suse.de \
--to=hare@suse.de \
--cc=Benoit_Arthur@emc.com \
--cc=Eddie.Williams@steeleye.com \
--cc=dm-devel@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=sekharan@us.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).