[PATCH 16/20] nvme: revalidate zone bitmaps in nvme_update_ns_info

Christoph Hellwig hch at lst.de
Tue Sep 29 14:37:28 EDT 2020


On Mon, Sep 28, 2020 at 03:06:06PM +0000, Damien Le Moal wrote:
> On 2020/09/28 21:35, Christoph Hellwig wrote:
> > Consolidate the two calls into a single place.
> > 
> > Signed-off-by: Christoph Hellwig <hch at lst.de>
> > ---
> >  drivers/nvme/host/core.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> > index f19f6c7c5b1242..9c137d8819f756 100644
> > --- a/drivers/nvme/host/core.c
> > +++ b/drivers/nvme/host/core.c
> > @@ -2150,6 +2150,12 @@ static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_id_ns *id)
> >  	nvme_update_disk_info(ns->disk, ns, id);
> >  	blk_mq_unfreeze_queue(ns->disk->queue);
> >  
> > +	if (blk_queue_is_zoned(ns->queue)) {
> > +		ret = nvme_revalidate_zones(ns);
> > +		if (ret)
> > +			return ret;
> > +	}
> 
> Is it OK to call this before nvme_update_ns_info() ?

It is called after nvme_update_ns_info for the relevant gendisk,
but before the one for the multipath node.



More information about the Linux-nvme mailing list