projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c142ce0
)
sd: Optimal I/O size is in bytes, not sectors
author
Martin K. Petersen
<
[email protected]
>
Wed, 20 Jan 2016 16:01:23 +0000
(11:01 -0500)
committer
Martin K. Petersen
<
[email protected]
>
Thu, 21 Jan 2016 00:51:34 +0000
(19:51 -0500)
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 <
[email protected]
>
Reported-by: Christian Borntraeger <
[email protected]
>
Tested-by: Christian Borntraeger <
[email protected]
>
Fixes: ca369d51b3e1649be4a72addd6d6a168cfb3f537
Cc:
[email protected]
# 4.4+
Reviewed-by: James E.J. Bottomley <
[email protected]
>
Reviewed-by: Ewan D. Milne <
[email protected]
>
Reviewed-by: Matthew R. Ochs <
[email protected]
>
drivers/scsi/sd.c
patch
|
blob
|
history
diff --git
a/drivers/scsi/sd.c
b/drivers/scsi/sd.c
index 4e08d1cd704d1c261c82a98067649154f433ecd1..ec163d08f6c3287936369543343b8fb12b6498a6 100644
(file)
--- a/
drivers/scsi/sd.c
+++ b/
drivers/scsi/sd.c
@@
-2893,7
+2893,7
@@
static int sd_revalidate_disk(struct gendisk *disk)
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;