From: Christoph Hellwig <hch@lst.de>
To: Hannes Reinecke <hare@suse.de>
Cc: linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>,
Keith Busch <keith.busch@wdc.com>,
Sagi Grimberg <sagi@grimberg.me>
Subject: Re: [PATCH 3/3] nvme: add 'queue_if_no_path' sysfs attribute
Date: Mon, 5 Oct 2020 13:31:21 +0200 [thread overview]
Message-ID: <20201005113121.GC26872@lst.de> (raw)
In-Reply-To: <20201005094256.49358-4-hare@suse.de>
On Mon, Oct 05, 2020 at 11:42:56AM +0200, Hannes Reinecke wrote:
> Add a sysfs attribute 'queue_if_no_path' to allow the admin to
> view and modify the 'queue_if_no_path' flag.
ok, here it gets added. I think this needs to be folded into the
previous patch.
> +{
> + struct nvme_ns_head *head = dev_to_ns_head(dev);
> + int queue_if_no_path, err;
> +
> + err = kstrtoint(buf, 10, &queue_if_no_path);
> + if (err)
> + return -EINVAL;
> +
> + else if (queue_if_no_path <= 0)
I think this needs to use kstrtobool..
> #ifdef CONFIG_NVME_MULTIPATH
> &dev_attr_ana_grpid.attr,
> &dev_attr_ana_state.attr,
> @@ -3381,6 +3411,10 @@ static umode_t nvme_ns_id_attrs_are_visible(struct kobject *kobj,
> if (!memchr_inv(ids->eui64, 0, sizeof(ids->eui64)))
> return 0;
> }
> + if (a == &dev_attr_queue_if_no_path.attr) {
> + if (dev_to_disk(dev)->fops == &nvme_fops)
> + return 0;
> + }
> #ifdef CONFIG_NVME_MULTIPATH
The attribute only makes sense for the multipathing code, so it should
be under CONFIG_NVME_MULTIPATH.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2020-10-05 11:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-05 9:42 [RFC PATCHv2 0/3] nvme: queue_if_no_path functionality Hannes Reinecke
2020-10-05 9:42 ` [PATCH 1/3] nvme-mpath: delete disk after last connection Hannes Reinecke
2020-10-05 11:27 ` Christoph Hellwig
2020-10-05 9:42 ` [PATCH 2/3] nvme: add 'queue_if_no_path' semantics Hannes Reinecke
2020-10-05 11:29 ` Christoph Hellwig
2020-10-05 9:42 ` [PATCH 3/3] nvme: add 'queue_if_no_path' sysfs attribute Hannes Reinecke
2020-10-05 11:31 ` Christoph Hellwig [this message]
2020-10-05 11:38 ` Christoph Hellwig
2020-10-05 11:56 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201005113121.GC26872@lst.de \
--to=hch@lst.de \
--cc=hare@suse.de \
--cc=keith.busch@wdc.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).