]> git.ipfire.org Git - thirdparty/linux.git/commit
block: set default max segment size in case of virt_boundary
authorMing Lei <ming.lei@redhat.com>
Wed, 24 Apr 2024 13:47:22 +0000 (21:47 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 7 May 2024 02:27:51 +0000 (20:27 -0600)
commitffd379c13fc0ab2c7c4313e7a01c71d9d202cc88
tree62db69962865a98131d15bbd21c477d08816609f
parentfb15ffd06115047689d05897510b423f9d144461
block: set default max segment size in case of virt_boundary

For devices with virt_boundary limit, the driver may provide zero max
segment size, we have to set it as UINT_MAX at default. Otherwise, it
may cause warning in driver when handling sglist.

Fix it by setting default max segment size as UINT_MAX.

Cc: Christoph Hellwig <hch@lst.de>
Cc: Mike Snitzer <snitzer@kernel.org>
Fixes: b561ea56a264 ("block: allow device to have both virt_boundary_mask and max segment size")
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Closes: https://lore.kernel.org/linux-block/7e38b67c-9372-a42d-41eb-abdce33d3372@linux-m68k.org/
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20240424134722.2584284-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-settings.c