[PATCHv2] nvme: fixup zns namespace initialisation
Christoph Hellwig
hch at lst.de
Fri May 24 00:36:40 PDT 2024
On Fri, May 24, 2024 at 08:18:08AM +0200, Hannes Reinecke wrote:
> nvme_set_chunk_sectors() needs to know whether it's a zoned namespace
> or not, but the information is only set in a later call.
It doesn't really "need to know it". It's kinda handy to warn if
a zone namespace sets an IOB.
> So move the calls around and ensure that the namespace is marked as
> non-zoned initially to avoid calculation errors when trying to derive
> a non-existing zone geometry.
>
> Fixes: c85c9ab926a5 ("nvme: split nvme_update_zone_info")
Even before that commit, nvme_update_zone_info is clearly called only
after nvme_set_chunk_sectors. The order goes back to
73d90386b559d6f4c3c5db5e6bb1b68aae8fd3e7 as far as I can tell.
Note that until the atomic limits series we kinda had to do it that
way as nvme_update_zone_info needs the sector size and other earlier
information.
The changes themselves looks fine, though:
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the Linux-nvme
mailing list