On 01/20/2016 05:01 PM, 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.petersen@xxxxxxxxxx> > Reported-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> > --- > 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; > the error message is gone Tested-by: Christian Borntraeger <borntraeger@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html