Re: [PATCH v2 02/13] block: refactor disk_revalidate_zone_resources()
Christoph Hellwig <[email protected]> Mon, 10 Aug 2026 16:47:47 +0200
| Newsgroups | org.kernel.vger.linux-block |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Aug 07, 2026 at 01:04:34AM +0900, Damien Le Moal wrote: > The function disk_revalidate_zone_resources() is misnamed as it does not > revalidate anything but rather allocates the revalidation arguments and > then calls disk_alloc_zone_resources() to initialize the disk zone > resources if they are needed and not already allocated. > > Make this function less confusing by renaming it > disk_init_revalidate_args() and moving the call to > disk_alloc_zone_resources() into blk_revalidate_disk_zones(). As before, > this function is only called if the zone resources are needed and not yet > allocated. > > Signed-off-by: Damien Le Moal <[email protected]> > Reviewed-by: Hannes Reinecke <[email protected]> > --- > block/blk-zoned.c | 69 ++++++++++++++++++++++++----------------------- > 1 file changed, 36 insertions(+), 33 deletions(-) > > diff --git a/block/blk-zoned.c b/block/blk-zoned.c > index b47e32bf4602..0580f0bc333c 100644 > --- a/block/blk-zoned.c > +++ b/block/blk-zoned.c > @@ -1854,12 +1854,20 @@ static int disk_zone_wplugs_worker(void *data) > > void disk_init_zone_resources(struct gendisk *disk) > { > + atomic_set(&disk->nr_zone_wplugs, 0); Moving this initialization is not really mention in the commit log. I guess it makes sense to keep all these initializers together, but it would be nice to mention it or even split it out into a separate patch. Otherwise looks good: Reviewed-by: Christoph Hellwig <[email protected]>