Re: [PATCH 14/26] null_blk: Introduce zone_append_max_sectors attribute

Hannes Reinecke
2024-02-04T12:32:18Z

On 2/2/24 15:30, Damien Le Moal wrote:
> 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.
>
> null_submit_bio() is modified to use blk_zone_write_plug_bio() to
> handle zone append emulation if that is enabled.
>
> Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
> ---
> drivers/block/null_blk/main.c | 40 +++++++++++++++++++++----------
> drivers/block/null_blk/null_blk.h | 1 +
> drivers/block/null_blk/zoned.c | 31 ++++++++++++++++++------
> 3 files changed, 52 insertions(+), 20 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald,
Werner Knoblich