From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Mikhail Malygin <m.malygin@yadro.com>,
linux-nvme@lists.infradead.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] nvmet: add revalidate ns sysfs attribute to handle device resize
Date: Sat, 28 Sep 2019 00:13:52 +0200 [thread overview]
Message-ID: <20190927221352.GA17568@lst.de> (raw)
In-Reply-To: <80c2509b-bd48-c3c4-13bf-8ad6b1c0f77a@grimberg.me>
On Fri, Sep 27, 2019 at 10:24:17AM -0700, Sagi Grimberg wrote:
>> +int nvmet_ns_revalidate(struct nvmet_ns *ns)
>> +{
>> + struct nvmet_subsys *subsys = ns->subsys;
>> + int ret = 0;
>> +
>> + mutex_lock(&subsys->lock);
>> + if(!ns->enabled){
>> + goto out_unlock;
>> + }
>> +
>> + if(ns->bdev){
>> + ret = nvmet_bdev_ns_revalidate(ns);
>> + }else if(ns->file){
>> + ret = nvmet_file_ns_revalidate(ns);
>> + }
>> +
>> + nvmet_ns_changed(subsys, ns->nsid);
>
> Shouldn't that happen only of the size changed?
s/of/if/ ?
I guess we could do a sanity check first.
> So what is the model here? have some udev rule to
> trigger this?
Well, even if there was a udev rule we can't directly rely on it.
Mikhail actually talked with me about this at SDC, and I suggested to
just implement a simple file to revalidate from userspace, as we have no
good way to figure out if it changed in the kernel code.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2019-09-27 22:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-26 23:19 [PATCH] nvmet: add revalidate ns sysfs attribute to handle device resize Mikhail Malygin
2019-09-27 17:24 ` Sagi Grimberg
2019-09-27 22:13 ` Christoph Hellwig [this message]
2019-09-27 22:34 ` Sagi Grimberg
2019-09-27 22:51 ` Christoph Hellwig
2019-09-30 15:16 ` Mikhail Malygin
2019-09-30 15:02 ` [PATCH v2] " m.malygin
2019-10-05 0:03 ` Sagi Grimberg
2019-10-06 10:12 ` Christoph Hellwig
2019-10-07 7:45 ` Mikhail Malygin
2019-10-07 7:39 ` [PATCH v3] " m.malygin
2019-10-07 16:56 ` Christoph Hellwig
2019-10-07 19:58 ` Mikhail Malygin
2019-10-07 19:57 ` [PATCH v4] " m.malygin
2019-10-08 2:30 ` Chaitanya Kulkarni
2019-10-08 12:30 ` Mikhail Malygin
2019-10-08 7:16 ` Christoph Hellwig
2019-10-08 12:29 ` [PATCH v5] " m.malygin
2019-10-08 17:27 ` Chaitanya Kulkarni
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=20190927221352.GA17568@lst.de \
--to=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=m.malygin@yadro.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.