mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
sd: Optimal I/O size is in bytes, not sectors
Commitca369d51b3("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:ca369d51b3Cc: [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]>
This commit is contained in:
parent
c142ce0d3c
commit
d0eb20a863
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue