From: Vivek Goyal <vgoyal@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, miklos@szeredi.hu,
gmaglione@redhat.com, Greg KH <gregkh@linuxfoundation.org>,
virtio-fs@lists.linux.dev, Alyssa Ross <hi@alyssa.is>,
mzxreary@0pointer.de
Subject: Re: [PATCH v3 0/3] virtiofs: export filesystem tags through sysfs
Date: Fri, 9 Feb 2024 12:21:42 -0500 [thread overview]
Message-ID: <ZcZfJmfyU7haGtDY@redhat.com> (raw)
In-Reply-To: <20240209121820.755722-1-stefanha@redhat.com>
On Fri, Feb 09, 2024 at 07:18:17AM -0500, Stefan Hajnoczi wrote:
> v3:
> - Use dev_dbg() to avoid spamming logs [Greg]
> - Fix 644 mode on "tag" attr and use __ATTR_RO() [Greg]
> - Use kset_uevent_ops and eliminate explicit KOBJ_REMOVE [Greg]
> v2:
> - Vivek mentioned that he didn't have time to work on this patch series
> recently so I gave it a shot.
> - Information is now exposed in /sys/fs/virtiofs/ whereas before it was part of
> the generic virtio device kobject, which didn't really fit.
>
> Userspace needs a way to enumerate available virtiofs filesystems and detect
> when they are hotplugged or unplugged. This would allow systemd to wait for a
> virtiofs filesystem during boot, for example.
>
> This patch series adds the following in sysfs:
>
> /sys/fs/virtiofs/<n>/tag - unique identifier for mount(8)
> /sys/fs/virtiofs/<n>/device - symlink to virtio device
Hi Stefan,
Thanks for the patches. I am glad you are solving this problem.
I am testing your patches. After boot, I see /sys/fs/virtiofs/ directory
but that directory is empty. No entries for any tags. I do have one
tag exported named "myfs" to the VM. And I can mount it.
Thanks
Vivek
>
> A uevent is emitted when virtiofs devices are hotplugged or unplugged:
>
> KERNEL[111.113221] add /fs/virtiofs/2 (virtiofs)
> ACTION=add
> DEVPATH=/fs/virtiofs/2
> SUBSYSTEM=virtiofs
> TAG=test
>
> KERNEL[165.527167] remove /fs/virtiofs/2 (virtiofs)
> ACTION=remove
> DEVPATH=/fs/virtiofs/2
> SUBSYSTEM=virtiofs
> TAG=test
>
> Stefan Hajnoczi (3):
> virtiofs: forbid newlines in tags
> virtiofs: export filesystem tags through sysfs
> virtiofs: emit uevents on filesystem events
>
> fs/fuse/virtio_fs.c | 135 +++++++++++++++++---
> Documentation/ABI/testing/sysfs-fs-virtiofs | 11 ++
> 2 files changed, 125 insertions(+), 21 deletions(-)
> create mode 100644 Documentation/ABI/testing/sysfs-fs-virtiofs
>
> --
> 2.43.0
>
prev parent reply other threads:[~2024-02-09 17:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-09 12:18 [PATCH v3 0/3] virtiofs: export filesystem tags through sysfs Stefan Hajnoczi
2024-02-09 12:18 ` [PATCH v3 1/3] virtiofs: forbid newlines in tags Stefan Hajnoczi
2024-02-09 12:18 ` [PATCH v3 2/3] virtiofs: export filesystem tags through sysfs Stefan Hajnoczi
2024-02-09 12:18 ` [PATCH v3 3/3] virtiofs: emit uevents on filesystem events Stefan Hajnoczi
2024-02-09 17:21 ` Vivek Goyal [this message]
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=ZcZfJmfyU7haGtDY@redhat.com \
--to=vgoyal@redhat.com \
--cc=gmaglione@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hi@alyssa.is \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=mzxreary@0pointer.de \
--cc=stefanha@redhat.com \
--cc=virtio-fs@lists.linux.dev \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).