From: Mikhail Malygin <m.malygin@yadro.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Christoph Hellwig <hch@lst.de>,
"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>
Subject: Re: [PATCH] nvmet: add revalidate ns sysfs attribute to handle device resize
Date: Mon, 30 Sep 2019 15:16:42 +0000 [thread overview]
Message-ID: <61441646-BB45-4F84-A370-CE7E02415172@yadro.com> (raw)
In-Reply-To: <80c2509b-bd48-c3c4-13bf-8ad6b1c0f77a@grimberg.me>
Just posted an updated version with size check before triggering ns_changed.
Regarding the model, I’m managing both block devices and targets from userspace daemon, so
just need any reliable way to update target ns size once I resized block device.
> On 27 Sep 2019, at 20:24, Sagi Grimberg <sagi@grimberg.me> 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?
>
> So what is the model here? have some udev rule to
> trigger this?
_______________________________________________
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-30 15:16 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
2019-09-27 22:34 ` Sagi Grimberg
2019-09-27 22:51 ` Christoph Hellwig
2019-09-30 15:16 ` Mikhail Malygin [this message]
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=61441646-BB45-4F84-A370-CE7E02415172@yadro.com \
--to=m.malygin@yadro.com \
--cc=hch@lst.de \
--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).