Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347257 > unrolled thread

[PATCH 4.4 267/342] sd: Optimal I/O size is in bytes, not sectors

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-03-02 01:30 +0100
Last post2016-03-02 01:30 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 267/342] sd: Optimal I/O size is in bytes, not sectors Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 01:30 +0100

#1347257 — [PATCH 4.4 267/342] sd: Optimal I/O size is in bytes, not sectors

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-02 01:30 +0100
Subject[PATCH 4.4 267/342] sd: Optimal I/O size is in bytes, not sectors
Message-ID<r82PW-8co-51@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Martin K. Petersen <martin.petersen@oracle.com>

commit d0eb20a863ba7dc1d3f4b841639671f134560be2 upstream.

Commit ca369d51b3e1 ("block/sd: Fix device-imposed transfer length
limits") accidentally switched optimal I/O size reporting from bytes to
block layer sectors.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Fixes: ca369d51b3e1649be4a72addd6d6a168cfb3f537
Reviewed-by: James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Reviewed-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/sd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2893,7 +2893,7 @@ static int sd_revalidate_disk(struct gen
 	    sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
 	    sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_CACHE_SIZE)
 		rw_max = q->limits.io_opt =
-			logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
+			sdkp->opt_xfer_blocks * sdp->sector_size;
 	else
 		rw_max = BLK_DEF_MAX_SECTORS;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web