mbox series

[0/6] filesystem visibility ioctls

Message ID 20240205200529.546646-1-kent.overstreet@linux.dev (mailing list archive)
Headers show
Series filesystem visibility ioctls | expand

Message

Kent Overstreet Feb. 5, 2024, 8:05 p.m. UTC
Hi all,

this patchset adds a few new ioctls to standardize a few interfaces we
want
 - get/set UUID
 - get sysfs path

The get/set UUID ioctls are lifted versions of the ext4 ioctls with one
difference, killing the flexible array member - we'll never have UUIDs
more than 16 bytes, and getting rid of the flexible array member makes
them easier to use.

FS_IOC_GETSYSFSNAME is new, but it addresses something that we've been
doing in fs specific code for awhile - "given a path on a mounted
filesystem, tell me where it lives in sysfs".

Cheers,
Kent

Kent Overstreet (6):
  fs: super_block->s_uuid_len
  fs: FS_IOC_GETUUID
  fat: Hook up sb->s_uuid
  fs: FS_IOC_GETSYSFSNAME
  xfs: add support for FS_IOC_GETSYSFSNAME
  bcachefs: add support for FS_IOC_GETSYSFSNAME

 fs/bcachefs/fs.c        |  1 +
 fs/fat/inode.c          |  4 ++++
 fs/ioctl.c              | 33 +++++++++++++++++++++++++++++++++
 fs/super.c              |  1 +
 fs/xfs/xfs_mount.c      |  2 ++
 include/linux/fs.h      |  2 ++
 include/uapi/linux/fs.h | 21 +++++++++++++++++++++
 7 files changed, 64 insertions(+)

Comments

Christian Brauner Feb. 6, 2024, 4:22 p.m. UTC | #1
On Mon, Feb 05, 2024 at 03:05:11PM -0500, Kent Overstreet wrote:
> Hi all,
> 
> this patchset adds a few new ioctls to standardize a few interfaces we
> want
>  - get/set UUID

Last time I spoke in favor of exposing the UUID as a generic ioctl most
were supportive. But I remember that setting the UUID was a lot more
contentious. If that's changed though then great.

>  - get sysfs path
> 
> The get/set UUID ioctls are lifted versions of the ext4 ioctls with one
> difference, killing the flexible array member - we'll never have UUIDs
> more than 16 bytes, and getting rid of the flexible array member makes
> them easier to use.
> 
> FS_IOC_GETSYSFSNAME is new, but it addresses something that we've been
> doing in fs specific code for awhile - "given a path on a mounted
> filesystem, tell me where it lives in sysfs".
> 
> Cheers,
> Kent

When you send v2 could you please just put me in to. Makes it easier for
me to pick this series from the list. Thanks!