[PATCH V2] nvme: report capacity 0 for non supported ZNS SSDs

Keith Busch kbusch at kernel.org
Mon Nov 2 10:44:50 EST 2020


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:

  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.



More information about the Linux-nvme mailing list