Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
"A single fix for machines with pages > 4k (PPC mostly).

There's a bug in our optimal transfer size code where we don't account
for pages > 4k and can set the transfer size to be less than the page
size causing nasty failures"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
sd: Reject optimal transfer length smaller than page size

+6 -3
+6 -3
drivers/scsi/sd.c
··· 2885 2885 2886 2886 /* 2887 2887 * Use the device's preferred I/O size for reads and writes 2888 - * unless the reported value is unreasonably large (or garbage). 2888 + * unless the reported value is unreasonably small, large, or 2889 + * garbage. 2889 2890 */ 2890 - if (sdkp->opt_xfer_blocks && sdkp->opt_xfer_blocks <= dev_max && 2891 - sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS) 2891 + if (sdkp->opt_xfer_blocks && 2892 + sdkp->opt_xfer_blocks <= dev_max && 2893 + sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS && 2894 + sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_CACHE_SIZE) 2892 2895 rw_max = q->limits.io_opt = 2893 2896 logical_to_sectors(sdp, sdkp->opt_xfer_blocks); 2894 2897 else