Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

block: rename min_segment_size

Despite its name, the block layer is fine with segments smaller that the
"min_segment_size" limit. The value is an optimization limit indicating
the largest segment that can be used without considering boundary
limits. Smaller segments can take a fast path, so give it a name that
reflects that: max_fast_segment_size.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Keith Busch and committed by
Jens Axboe
5c5028ee e5a82249

+5 -5
+1 -1
block/blk-merge.c
··· 336 336 337 337 if (nsegs < lim->max_segments && 338 338 bytes + bv.bv_len <= max_bytes && 339 - bv.bv_offset + bv.bv_len <= lim->min_segment_size) { 339 + bv.bv_offset + bv.bv_len <= lim->max_fast_segment_size) { 340 340 nsegs++; 341 341 bytes += bv.bv_len; 342 342 } else {
+2 -2
block/blk-settings.c
··· 457 457 return -EINVAL; 458 458 } 459 459 460 - /* setup min segment size for building new segment in fast path */ 460 + /* setup max segment size for building new segment in fast path */ 461 461 if (lim->seg_boundary_mask > lim->max_segment_size - 1) 462 462 seg_size = lim->max_segment_size; 463 463 else 464 464 seg_size = lim->seg_boundary_mask + 1; 465 - lim->min_segment_size = min_t(unsigned int, seg_size, PAGE_SIZE); 465 + lim->max_fast_segment_size = min_t(unsigned int, seg_size, PAGE_SIZE); 466 466 467 467 /* 468 468 * We require drivers to at least do logical block aligned I/O, but
+1 -1
block/blk.h
··· 377 377 if (bio->bi_vcnt != 1) 378 378 return true; 379 379 return bio->bi_io_vec->bv_len + bio->bi_io_vec->bv_offset > 380 - lim->min_segment_size; 380 + lim->max_fast_segment_size; 381 381 } 382 382 383 383 /**
+1 -1
include/linux/blkdev.h
··· 378 378 unsigned int max_sectors; 379 379 unsigned int max_user_sectors; 380 380 unsigned int max_segment_size; 381 - unsigned int min_segment_size; 381 + unsigned int max_fast_segment_size; 382 382 unsigned int physical_block_size; 383 383 unsigned int logical_block_size; 384 384 unsigned int alignment_offset;