scsi: sd: Add a comment about limiting max_sectors to shost optimal limit
PATCH 1/1 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 Damien Le Moal <[email protected]>
Signed-off-by John Garry <[email protected]>
drivers/scsi/sd.c +5 -0
@@ -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 */
Signature · 1 line
2.35.3
Quoted 12 lines · John Garry
Add a comment about limiting the default the SCSI disk
request_queuemax_sectorsinitial value to that of the SCSI host optimal sectors limit.Suggested-by Damien Le Moal <[email protected]>Signed-off-by John Garry <[email protected]>drivers/scsi/sd.c +0
-0@@ -3296,6 +3296,11 @@ static int sd_revalidate_disk(struct gendisk *disk) (sector_t)BLK_DEF_MAX_SECTORS);
drivers/scsi/sd.c static int sd_revalidate_disk(struct gendisk *disk) · line 3306
Quoted 10 lines
drivers/scsi/sd.c +5
-0} +/* +* 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 */
Looks good.
Reviewed-by Damien Le Moal <[email protected]>
Signature · 2 lines
Damien Le Moal Western Digital Research
John,
Quoted 2 lines
Add a comment about limiting the default the SCSI disk
request_queuemax_sectorsinitial value to that of the SCSI host optimal sectors limit.
Reviewed-by Martin K. Petersen <[email protected]>
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering
Christoph Hellwig
AppliedThanks, applied.