null_blk: Introduce zone_append_max_sectors attribute
authorDamien Le Moal <dlemoal@kernel.org>
Mon, 8 Apr 2024 01:41:16 +0000 (10:41 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Apr 2024 14:44:03 +0000 (08:44 -0600)
commit997a1f08b4d4283687477470bcc256dfd33ba9d0
tree42d83716be79535b44755413e732a0ef805cc15f
parentb66f79b706f0cfc09bde8465668428eef188a94c
null_blk: Introduce zone_append_max_sectors attribute

Add the zone_append_max_sectors configfs attribute and module parameter
to allow configuring the maximum number of 512B sectors of zone append
operations. This attribute is meaningful only for zoned null block
devices.

If not specified, the default is unchanged and the zoned device max
append sectors limit is set to the device max sectors limit.
If a non 0 value is used for this attribute, which is the default,
then native support for zone append operations is enabled.
Setting a 0 value disables native zone append operations support to
instead use the block layer emulation.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Tested-by: Hans Holmberg <hans.holmberg@wdc.com>
Tested-by: Dennis Maisenbacher <dennis.maisenbacher@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240408014128.205141-17-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/null_blk/main.c
drivers/block/null_blk/null_blk.h
drivers/block/null_blk/zoned.c