[PATCH] nvme-core: check id->mc before setting NVME_NS_METADATA_SUPPORTED
Christoph Hellwig
hch at lst.de
Mon Jul 10 00:01:10 PDT 2023
On Fri, Jun 30, 2023 at 07:41:27PM +0200, irvin cote wrote:
> >The MC field is primarily for use when sending a format command to know
> >what are valid possibilities. If the reported MS and FLBAS are out of
> >sync with metadata capabilities, then the controller is broken.
>
> Beware having MC and FLBAS out of sync does not necessarily mean we
> have a broken controller :
> MC could be 0 (no metadata support at all) and FLBAS has no way to
> express that, it can only indicate which metadata type was selected by
> the user.
> In such a case we could wrongfully signal metadata as supported when it is not
The LBA Format Data Structure indicates the metadata size for any
given format.
More information about the Linux-nvme
mailing list