Skip to content

Commit

Permalink
[SCSI] scsi_dh_alua: Decrease retry interval
Browse files Browse the repository at this point in the history
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>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Hannes Reinecke authored and James Bottomley committed Aug 30, 2011
1 parent cfde3fa commit ebd1f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/device_handler/scsi_dh_alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit ebd1f64

Please sign in to comment.