diff options
author | John Garry <john.g.garry@oracle.com> | 2024-06-20 12:53:51 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-06-20 15:19:17 -0600 |
commit | f70167a7a6e7e8a6911f3a216dc044cbfe7c1983 (patch) | |
tree | e3f10bf5aa0b0ccb34a3f7ef9f116fb42581cf9e /drivers/md/dm.c | |
parent | 8d1dfd51c84e202df05a999ce82cb27554f7d152 (diff) | |
download | lwn-f70167a7a6e7e8a6911f3a216dc044cbfe7c1983.tar.gz lwn-f70167a7a6e7e8a6911f3a216dc044cbfe7c1983.zip |
block: Generalize chunk_sectors support as boundary support
The purpose of the chunk_sectors limit is to ensure that a mergeble request
fits within the boundary of the chunck_sector value.
Such a feature will be useful for other request_queue boundary limits, so
generalize the chunk_sectors merge code.
This idea was proposed by Hannes Reinecke.
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Link: https://lore.kernel.org/r/20240620125359.2684798-3-john.g.garry@oracle.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 8a976cee448b..7d107ae06e1a 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -1188,7 +1188,7 @@ static sector_t __max_io_len(struct dm_target *ti, sector_t sector, return len; return min_t(sector_t, len, min(max_sectors ? : queue_max_sectors(ti->table->md->queue), - blk_chunk_sectors_left(target_offset, max_granularity))); + blk_boundary_sectors_left(target_offset, max_granularity))); } static inline sector_t max_io_len(struct dm_target *ti, sector_t sector) |