linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] virtiofs: export filesystem tags through sysfs
@ 2024-02-08 19:32 Stefan Hajnoczi
  2024-02-08 19:32 ` [PATCH v2 1/3] virtiofs: forbid newlines in tags Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2024-02-08 19:32 UTC (permalink / raw)
  To: linux-fsdevel
  Cc: Alyssa Ross, gmaglione, virtio-fs, vgoyal, mzxreary, Greg KH,
	miklos, Stefan Hajnoczi

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

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                         | 138 +++++++++++++++++---
 Documentation/ABI/testing/sysfs-fs-virtiofs |  11 ++
 2 files changed, 128 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-fs-virtiofs

-- 
2.43.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-02-09 12:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 19:32 [PATCH v2 0/3] virtiofs: export filesystem tags through sysfs Stefan Hajnoczi
2024-02-08 19:32 ` [PATCH v2 1/3] virtiofs: forbid newlines in tags Stefan Hajnoczi
2024-02-09 10:33   ` Greg KH
2024-02-09 11:30     ` Stefan Hajnoczi
2024-02-08 19:32 ` [PATCH v2 2/3] virtiofs: export filesystem tags through sysfs Stefan Hajnoczi
2024-02-09 10:36   ` Greg KH
2024-02-09 11:33     ` Stefan Hajnoczi
2024-02-08 19:32 ` [PATCH v2 3/3] virtiofs: emit uevents on filesystem events Stefan Hajnoczi
2024-02-09 10:39   ` Greg KH
2024-02-09 12:15     ` Stefan Hajnoczi

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).