* [PATCH 3/3] scsi_dh_rdac : decide on whether to send mode select or not based on operating mode
@ 2011-04-08 17:39 Moger, Babu
2011-04-20 15:11 ` Moger, Babu
0 siblings, 1 reply; 2+ messages in thread
From: Moger, Babu @ 2011-04-08 17:39 UTC (permalink / raw)
To: linux-scsi, device-mapper development
Cc: Dachepalli, Sudhir, Qi, Yanling, Chauhan, Vijay, Stankey, Robert,
Arumugam, Anburaja, Krishnasamy, Somasundaram
Based on the operating modes, handler decides whether to send mode select or not. Purpose here is to reduce
io-shipping as much as possible whenever there is an option.
Signed-off-by: Babu Moger <babu.moger@lsi.com>
Reviewed-by: Yanling Qi <yanling.qi@lsi.com>
Reviewed-by: Sudhir Dachepalli <Sudhir.Dachepalli@lis.com>
Reviewed-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com>
Reviewed-by: Bob Stankey <Robert.Stankey@lsi.com>
Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com>
---
--- linux-2.6.38/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2011-03-17 16:57:51.000000000 -0500
+++ linux-2.6.38/drivers/scsi/device_handler/scsi_dh_rdac.c 2011-03-17 16:59:11.000000000 -0500
@@ -670,12 +670,27 @@ static int rdac_activate(struct scsi_dev
{
struct rdac_dh_data *h = get_rdac_data(sdev);
int err = SCSI_DH_OK;
+ int act = 0;
err = check_ownership(sdev, h);
if (err != SCSI_DH_OK)
goto done;
- if (h->lun_state == RDAC_LUN_UNOWNED) {
+ switch (h->mode) {
+ case RDAC_MODE:
+ if (h->lun_state == RDAC_LUN_UNOWNED)
+ act = 1;
+ break;
+ case RDAC_MODE_IOSHIP:
+ if ((h->lun_state == RDAC_LUN_UNOWNED) &&
+ (h->preferred == RDAC_PREFERRED))
+ act = 1;
+ break;
+ default:
+ break;
+ }
+
+ if (act) {
err = queue_mode_select(sdev, fn, data);
if (err == SCSI_DH_OK)
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [PATCH 3/3] scsi_dh_rdac : decide on whether to send mode select or not based on operating mode
2011-04-08 17:39 [PATCH 3/3] scsi_dh_rdac : decide on whether to send mode select or not based on operating mode Moger, Babu
@ 2011-04-20 15:11 ` Moger, Babu
0 siblings, 0 replies; 2+ messages in thread
From: Moger, Babu @ 2011-04-20 15:11 UTC (permalink / raw)
To: linux-scsi, device-mapper development; +Cc: Cummins, Charles, James Bottomley
> -----Original Message-----
> From: linux-scsi-owner@vger.kernel.org [mailto:linux-scsi-
> owner@vger.kernel.org] On Behalf Of Moger, Babu
> Sent: Friday, April 08, 2011 12:40 PM
> To: linux-scsi@vger.kernel.org; device-mapper development
> Cc: Dachepalli, Sudhir; Qi, Yanling; Chauhan, Vijay; Stankey, Robert;
> Arumugam, Anburaja; Krishnasamy, Somasundaram
> Subject: [PATCH 3/3] scsi_dh_rdac : decide on whether to send mode
> select or not based on operating mode
>
> Based on the operating modes, handler decides whether to send mode
> select or not. Purpose here is to reduce
> io-shipping as much as possible whenever there is an option.
>
> Signed-off-by: Babu Moger <babu.moger@lsi.com>
> Reviewed-by: Yanling Qi <yanling.qi@lsi.com>
> Reviewed-by: Sudhir Dachepalli <Sudhir.Dachepalli@lis.com>
> Reviewed-by: Somasundaram Krishnasamy <Somasundaram.Krishnasamy@lsi.com>
> Reviewed-by: Bob Stankey <Robert.Stankey@lsi.com>
> Reviewed-by: Vijay Chauhan <Vijay.Chauhan@lsi.com>
Tested-by: Charles Cummins <Charles.cummins@lsi.com>
>
> ---
> --- linux-2.6.38/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2011-
> 03-17 16:57:51.000000000 -0500
> +++ linux-2.6.38/drivers/scsi/device_handler/scsi_dh_rdac.c 2011-03-17
> 16:59:11.000000000 -0500
> @@ -670,12 +670,27 @@ static int rdac_activate(struct scsi_dev
> {
> struct rdac_dh_data *h = get_rdac_data(sdev);
> int err = SCSI_DH_OK;
> + int act = 0;
>
> err = check_ownership(sdev, h);
> if (err != SCSI_DH_OK)
> goto done;
>
> - if (h->lun_state == RDAC_LUN_UNOWNED) {
> + switch (h->mode) {
> + case RDAC_MODE:
> + if (h->lun_state == RDAC_LUN_UNOWNED)
> + act = 1;
> + break;
> + case RDAC_MODE_IOSHIP:
> + if ((h->lun_state == RDAC_LUN_UNOWNED) &&
> + (h->preferred == RDAC_PREFERRED))
> + act = 1;
> + break;
> + default:
> + break;
> + }
> +
> + if (act) {
> err = queue_mode_select(sdev, fn, data);
> if (err == SCSI_DH_OK)
> return 0;
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-04-20 15:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-08 17:39 [PATCH 3/3] scsi_dh_rdac : decide on whether to send mode select or not based on operating mode Moger, Babu
2011-04-20 15:11 ` Moger, Babu
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.