Skip to content

Commit

Permalink
Revert "scsi: sd: Fix optimal I/O size for devices that change report…
Browse files Browse the repository at this point in the history
…ed values"

This reverts commit 20b0874.
  • Loading branch information
kartikbhalla12 committed Apr 4, 2020
1 parent 568c7ef commit 53f093a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -3123,11 +3123,9 @@ static int sd_revalidate_disk(struct gendisk *disk)
if (sd_validate_opt_xfer_size(sdkp, dev_max))
rw_max = q->limits.io_opt =
sdkp->opt_xfer_blocks * sdp->sector_size;
} else {
q->limits.io_opt = 0;
else
rw_max = min_not_zero(logical_to_sectors(sdp, dev_max),
(sector_t)BLK_DEF_MAX_SECTORS);
}

/* Do not exceed controller limit */
rw_max = min(rw_max, queue_max_hw_sectors(q));
Expand Down

0 comments on commit 53f093a

Please sign in to comment.