On Wed, 2016-01-20 at 11:01 -0500, Martin K. Petersen wrote: > 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.peter...@oracle.com> > Reported-by: Christian Borntraeger <borntrae...@de.ibm.com> > --- > 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 4e08d1cd704d..ec163d08f6c3 100644 > --- 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; >
We should mark the commit causing the problems, which went into 4.4 if I remember correctly: Fixes: ca369d51b3e1649be4a72addd6d6a168cfb3f537 Cc: sta...@vger.kernel.org # 4.4+ Reviewed-by: James E.J. Bottomley <james.bottom...@hansenpartnership.com> James -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html