[PATCH v2 1/3] nvmet: Expose max queues to sysfs

Daniel Wagner dwagner at suse.de
Mon Aug 29 00:57:27 PDT 2022


> > +static ssize_t nvmet_subsys_attr_qid_max_store(struct config_item *item,
> > +					       const char *page, size_t cnt)
> > +{
> > +	u16 qid_max;
> > +
> > +	if (sscanf(page, "%hu\n", &qid_max) != 1)
> > +		return -EINVAL;
> > +
> > +	if (qid_max == 0)
> > +		return -EINVAL;
> > +
> > +	down_write(&nvmet_config_sem);
> > +	to_subsys(item)->max_qid = qid_max;
> > +	up_write(&nvmet_config_sem);
> 
> I would have expected this to trigger a reconnect; as it stands it requires
> the user to explicitly do a reconnect via nvme-cli, and there's a fair
> chance the number of queues will be specified there.
> Hmm?

Good point. Currently we do not allow to change the attributes when the
port is enabled. I think we should the same here because we currently
don't have an interface for triggering a reconnect without going through
the fatal error handler.



More information about the Linux-nvme mailing list