diff options
author | Mike Snitzer <snitzer@redhat.com> | 2020-09-22 05:32:48 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-23 19:38:12 +0300 |
commit | 22ada802ede89829dd010a317d9b812b7df7111a (patch) | |
tree | 98b57efbcc32558e049ae856491e88b7ba17e4ac /include/linux/blkdev.h | |
parent | 0385971754f0aa0507ecd7f0a0f4a48781906eda (diff) | |
download | linux-22ada802ede89829dd010a317d9b812b7df7111a.tar.xz |
block: use lcm_not_zero() when stacking chunk_sectors
Like 'io_opt', blk_stack_limits() should stack 'chunk_sectors' using
lcm_not_zero() rather than min_not_zero() -- otherwise the final
'chunk_sectors' could result in sub-optimal alignment of IO to
component devices in the IO stack.
Also, if 'chunk_sectors' isn't a multiple of 'physical_block_size'
then it is a bug in the driver and the device should be flagged as
'misaligned'.
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/blkdev.h')
0 files changed, 0 insertions, 0 deletions