Thread (28 messages) 28 messages, 4 authors, 2014-07-17

Re: [PATCH 07/10] sd: retry write same commands

From: Hannes Reinecke <hare@suse.de>
Date: 2014-07-11 12:26:58

On 06/29/2014 03:34 PM, Christoph Hellwig wrote:
quoted hunk ↗ jump to hunk
Currently cmd->allowed is initialized from rq->retries for write same
commands, but retries is always 0 for non-BLOCK_PC requests.  Set it
to the standard number of retries instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
  drivers/scsi/sd.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 9737e78..777b141 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -843,7 +843,7 @@ static int sd_setup_write_same_cmnd(struct scsi_cmnd *cmd)
  	}

  	cmd->transfersize = sdp->sector_size;
-	cmd->allowed = rq->retries;
+	cmd->allowed = SD_MAX_RETRIES;

  	/*
  	 * For WRITE_SAME the data transferred in the DATA IN buffer is
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help