null_blk: Allow controlling max_hw_sectors limit
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 20 Nov 2020 01:55:18 +0000 (10:55 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Dec 2020 00:36:04 +0000 (17:36 -0700)
commitea17fd354ca8afd3e8962a77236b1a9a59262fdd
tree57a404139c3d0ac980df9ce1af2cf5c85064ddf5
parent0ec4d913ac69ec86757eec117fc2733018552aa7
null_blk: Allow controlling max_hw_sectors limit

Add the module option and configfs attribute max_sectors to allow
configuring the maximum size of a command issued to a null_blk device.
This allows exercising the block layer BIO splitting with different
limits than the default BLK_SAFE_MAX_SECTORS. This is also useful for
testing the zone append write path of file systems as the max_hw_sectors
limit value is also used for the max_zone_append_sectors limit.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk.h
drivers/block/null_blk_main.c