[PATCH v4 11/28] block: Allow BIO-based drivers to use blk_revalidate_disk_zones()
Hannes Reinecke
hare at suse.de
Tue Apr 2 23:41:45 PDT 2024
On 4/2/24 14:38, Damien Le Moal wrote:
> In preparation for allowing BIO based device drivers to use zone write
> plugging and its zone append emulation, allow these drivers to call
> blk_revalidate_disk_zones() so that all zone resources necessary to zone
> write plugging can be initialized.
>
> To do so, remove the check in blk_revalidate_disk_zones() restricting
> the use of this function to mq request-based drivers to allow also
> BIO-based drivers to use it. This is safe to do as long as the
> BIO-based block device queue is already setup and usable, as it should,
> and can be safely frozen.
>
> The helper function disk_need_zone_resources() is added to control the
> allocation and initialization of the zone write plug hash table and
> of the conventional zone bitmap only for mq devices and for BIO-based
> devices that require zone append emulation.
>
> Signed-off-by: Damien Le Moal <dlemoal at kernel.org>
> Reviewed-by: Christoph Hellwig <hch at lst.de>
> ---
> block/blk-zoned.c | 30 ++++++++++++++++++++++++------
> 1 file changed, 24 insertions(+), 6 deletions(-)
>
Reviewed-by: Hannes Reinecke <hare at suse.de>
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list