From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <james.bottomley@parallels.com>
Cc: linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: [PATCH 7/7] scsi_dh_alua: Decrease retry interval
Date: Wed, 24 Aug 2011 10:51:19 +0200 [thread overview]
Message-ID: <1314175879-16565-8-git-send-email-hare@suse.de> (raw)
In-Reply-To: <1314175879-16565-1-git-send-email-hare@suse.de>
The alua device handler starts the first retry after 10 seconds,
and increases it times 10 for each round.
This leads to an unnecessary delay. This patch modifies it to
start after one second, and increase by a factor of two.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 34c6611..9dce367 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -506,7 +506,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
int len, k, off, valid_states = 0;
unsigned char *ucp;
unsigned err;
- unsigned long expiry, interval = 10;
+ unsigned long expiry, interval = 1;
expiry = round_jiffies_up(jiffies + ALUA_FAILOVER_TIMEOUT);
retry:
@@ -567,7 +567,7 @@ static int alua_rtpg(struct scsi_device *sdev, struct alua_dh_data *h)
case TPGS_STATE_TRANSITIONING:
if (time_before(jiffies, expiry)) {
/* State transition, retry */
- interval *= 10;
+ interval *= 2;
msleep(interval);
goto retry;
}
--
1.6.0.2
prev parent reply other threads:[~2011-08-24 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 8:51 [PATCH 0/7] ALUA device handler update Hannes Reinecke
2011-08-24 8:51 ` [PATCH 1/7] scsi_dh_alua: Evaluate TPGS setting from inquiry data Hannes Reinecke
2011-08-24 8:51 ` [PATCH 2/7] scsi_dh: Fixup kernel-doc comments Hannes Reinecke
2011-08-24 8:51 ` [PATCH 3/7] scsi_dh: Implement match callback function Hannes Reinecke
2011-08-24 8:51 ` [PATCH 4/7] scsi_dh_alua: always update TPGS status on activate Hannes Reinecke
2011-08-24 8:51 ` [PATCH 5/7] scsi_dh: Check for sdev state in store_dh_state() Hannes Reinecke
2011-08-24 8:51 ` [PATCH 6/7] Erroneous TPG ID check in SCSI ALUA Handler Hannes Reinecke
2011-08-24 8:51 ` Hannes Reinecke [this message]
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=1314175879-16565-8-git-send-email-hare@suse.de \
--to=hare@suse.de \
--cc=james.bottomley@parallels.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