[RFC v1] nvme: add cse, ds, ms, nsze and nuse to sysfs

Keith Busch kbusch at kernel.org
Mon Nov 27 07:44:52 PST 2023


On Mon, Nov 27, 2023 at 03:18:57PM +0100, Christoph Hellwig wrote:
> On Mon, Nov 27, 2023 at 11:32:08AM +0100, Daniel Wagner wrote:
> > +static ssize_t lba_ms_show(struct device *dev, struct device_attribute *attr,
> > +		char *buf)
> > +{
> > +	struct nvme_ns *ns = dev_to_nvme_ns(dev);
> > +
> > +	return sysfs_emit(buf, "%d\n", ns->ms);
> > +}
> > +static DEVICE_ATTR_RO(lba_ms);
> 
> I'd probably spell out metadata_size, or probably even better
> metadata_bytes to match the unit postfixes elsewhere in the block code.

Should this even be an nvme specific attribute? I thought we should have
blk-integrity.c report its 'tuple_size' attribute instead. That should
work as long as we're not dealing with extended metadata at least, but
that's kind of a special format that doesn't have block layer support.



More information about the Linux-nvme mailing list