[PATCH V2] nvme: report capacity 0 for non supported ZNS SSDs
Niklas Cassel
Niklas.Cassel at wdc.com
Mon Nov 2 11:30:01 EST 2020
On Mon, Nov 02, 2020 at 04:15:01PM +0000, Javier Gonzalez wrote:
>
> From: Keith Busch <kbusch at kernel.org>
> Sent: Nov 2, 2020 16:45
> To: Javier González <javier at javigon.com>
> Cc: linux-nvme at lists.infradead.org; linux-block at vger.kernel.org; hch at lst.de; sagi at grimberg.me; axboe at kernel.dk; joshi.k at samsung.com; "Klaus B. Jensen" <k.jensen at samsung.com>; Niklas.Cassel at wdc.com; Javier Gonzalez <javier.gonz at samsung.com>
> Subject: Re: [PATCH V2] nvme: report capacity 0 for non supported ZNS SSDs
>
> On Mon, Nov 02, 2020 at 02:22:14PM +0100, Javier González wrote:
> > Changes since V1:
> > - Apply feedback from Niklas:
> > - Use IS_ENABLED() for checking config option
>
> Your v1 was correct. Using IS_ENBALED() attempts to use an undefined
> symbol when the CONFIG is not enabled:
>
> Oh. Ok. Will return to that.
Keith is correct, sorry for that.
https://www.kernel.org/doc/html/latest/process/coding-style.html#conditional-compilation
"Thus, you still have to use an #ifdef if the code inside the block
references symbols that will not exist if the condition is not met."
Kind regards,
Niklas
>
> drivers/nvme/host/core.c: In function ‘nvme_update_disk_info’:
> drivers/nvme/host/core.c:2056:45: error: ‘struct nvme_ns’ has no member named ‘zoned_ns_supp’
> 2056 | if (IS_ENABLED(CONFIG_BLK_DEV_ZONED) && !ns->zoned_ns_supp)
> | ^~
>
> That said, I don't mind the concept, though I recall Christoph had
> concerns about the existing 0-capacity namespace used for invalid
> formats, so I'd like to hear more on that if he has some spare time to
> comment.
>
> Sounds good. I'll respin a V3 in the meantime. Assuming not supported in the beginning gives problems with non zone namespaces either way. So I'll fix that too.
>
More information about the Linux-nvme
mailing list