diff options
author | John Garry <[email protected]> | 2022-07-19 17:51:04 +0800 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2022-07-22 17:14:59 +0200 |
commit | c9337ad4390cdff8877e64824c2a2827d815743d (patch) | |
tree | 0b471835ff8c0eff00a15a18185c36a62aa3d620 | |
parent | 0568e6122574dcc1aded2979cd0245038efe22b6 (diff) |
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]>
Reviewed-by: Damien Le Moal <[email protected]>
Reviewed-by: Martin K. Petersen <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
-rw-r--r-- | drivers/scsi/sd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 3eaee1f7aaca..ed9f43f9512e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -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 */ |