linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Add the ability to query mount options in statmount
@ 2024-06-24 19:40 Josef Bacik
  2024-06-24 19:40 ` [PATCH 1/4] fs: rename show_mnt_opts -> show_vfsmnt_opts Josef Bacik
                   ` (6 more replies)
  0 siblings, 7 replies; 24+ messages in thread
From: Josef Bacik @ 2024-06-24 19:40 UTC (permalink / raw)
  To: linux-fsdevel, brauner, kernel-team

Hello,

Currently if you want to get mount options for a mount and you're using
statmount(), you still have to open /proc/mounts to parse the mount options.
statmount() does have the ability to store an arbitrary string however,
additionally the way we do that is with a seq_file, which is also how we use
->show_options for the individual file systems.

Extent statmount() to have a flag for fetching the mount options of a mount.
This allows users to not have to parse /proc mount for anything related to a
mount.  I've extended the existing statmount() test to validate this feature
works as expected.  As you can tell from the ridiculous amount of silly string
parsing, this is a huge win for users and climate change as we will no longer
have to waste several cycles parsing strings anymore.

This is based on my branch that extends listmount/statmount to walk into foreign
namespaces.  Below are links to that posting, that branch, and this branch to
make it easier to review.

https://lore.kernel.org/linux-fsdevel/cover.1719243756.git.josef@toxicpanda.com/
https://github.com/josefbacik/linux/tree/listmount.combined
https://github.com/josefbacik/linux/tree/statmount-opts

Thanks,

Josef

Josef Bacik (4):
  fs: rename show_mnt_opts -> show_vfsmnt_opts
  fs: add a helper to show all the options for a mount
  fs: export mount options via statmount()
  sefltests: extend the statmount test for mount options

 fs/internal.h                                 |   5 +
 fs/namespace.c                                |   7 +
 fs/proc_namespace.c                           |  29 ++--
 include/uapi/linux/mount.h                    |   3 +-
 .../filesystems/statmount/statmount_test.c    | 131 +++++++++++++++++-
 5 files changed, 164 insertions(+), 11 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2024-11-12  8:54 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-24 19:40 [PATCH 0/4] Add the ability to query mount options in statmount Josef Bacik
2024-06-24 19:40 ` [PATCH 1/4] fs: rename show_mnt_opts -> show_vfsmnt_opts Josef Bacik
2024-06-24 19:40 ` [PATCH 2/4] fs: add a helper to show all the options for a mount Josef Bacik
2024-06-25 14:16   ` Christian Brauner
2024-06-26  7:47     ` Karel Zak
2024-06-24 19:40 ` [PATCH 3/4] fs: export mount options via statmount() Josef Bacik
2024-06-24 19:40 ` [PATCH 4/4] sefltests: extend the statmount test for mount options Josef Bacik
2024-06-24 19:53 ` [PATCH 0/4] Add the ability to query mount options in statmount Jeff Layton
2024-06-25 10:42 ` Christian Brauner
2024-06-25 13:00   ` Josef Bacik
2024-06-25 13:04     ` Miklos Szeredi
2024-06-25 13:35       ` Christian Brauner
2024-06-25 13:52         ` Karel Zak
2024-06-25 13:55           ` Christian Brauner
2024-06-25 14:17           ` Josef Bacik
2024-06-26  7:34             ` Karel Zak
2024-06-26 12:23             ` Miklos Szeredi
2024-11-11 13:12               ` Miklos Szeredi
2024-11-11 13:29                 ` Christian Brauner
2024-11-11 13:47                   ` Miklos Szeredi
2024-11-11 15:28                 ` Josef Bacik
2024-11-11 16:02                   ` Miklos Szeredi
2024-11-12  8:54                     ` Karel Zak
2024-06-26 12:03 ` (subset) " Christian Brauner

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