Re: [PATCH 01/14] block: remove disk_free_zone_resources()
Hannes Reinecke <[email protected]> Wed, 5 Aug 2026 13:17:44 +0200
| Newsgroups | org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
On 8/5/26 4:27 AM, Damien Le Moal wrote: > In the rare event when revalidating the zones of a zoned block device > fails, the device capacity will be dropped to 0. In such case, the zoned > block device will either be rescanned and restored or dropped entirely and > its gendisk destroyed. So calling disk_free_zone_resources() from > blk_revalidate_disk_zones() in case of error does not make much sense. We > can keep the zone resources in case the device is rescanned and restored > or simply free all resources in disk_release_zone_resources() when the > gendick is destroyed. > > Remove the call to disk_free_zone_resources() from > blk_revalidate_disk_zones() and squash disk_free_zone_resources() inside > disk_release_zone_resources(). With this change, the conditional creation > of the zone write plugs work queue is not necessary anymore as the > workqueue will keep existing together with all other resources until the > disk is released. This simplifies disk_alloc_zone_resources(). > > Signed-off-by: Damien Le Moal <[email protected]> > --- > block/blk-zoned.c | 56 +++++++++++++++++------------------------------ > 1 file changed, 20 insertions(+), 36 deletions(-) > Reviewed-by: Hannes Reinecke <[email protected]> Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect [email protected] +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