Commit c9337ad4 authored by John Garry's avatar John Garry Committed by Christoph Hellwig
Browse files

scsi: sd: Add a comment about limiting max_sectors to shost optimal limit



Add a comment about limiting the default the SCSI disk request_queue
max_sectors initial value to that of the SCSI host optimal sectors limit.

Suggested-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
Reviewed-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 0568e612
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -3296,6 +3296,11 @@ static int sd_revalidate_disk(struct gendisk *disk)
				      (sector_t)BLK_DEF_MAX_SECTORS);
	}

	/*
	 * Limit default to SCSI host optimal sector limit if set. There may be
	 * an impact on performance for when the size of a request exceeds this
	 * host limit.
	 */
	rw_max = min_not_zero(rw_max, sdp->host->opt_sectors);

	/* Do not exceed controller limit */