summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2024-11-12 16:37:27 +0300
committerChristian Brauner <brauner@kernel.org>2024-11-13 16:08:34 +0300
commit3a6ffeb127973806704655fe5fcd92141a5e83d5 (patch)
tree50f7bbb0ea4c9ab9e8cfb1778c478bf3597dbb98 /include
parentc4d7d90747f4e8b528c8cd0a2d9ac01dc4a9339e (diff)
parent44010543fc8bedad172aa5b6c43480e5d2124497 (diff)
downloadlinux-3a6ffeb127973806704655fe5fcd92141a5e83d5.tar.xz
Merge patch series "fs: allow statmount to fetch the fs_subtype and sb_source"
Jeff Layton <jlayton@kernel.org> says: Meta has some internal logging that scrapes /proc/self/mountinfo today. I'd like to convert it to use listmount()/statmount(), so we can do a better job of monitoring with containers. We're missing some fields though. This patchset adds them. * patches from https://lore.kernel.org/r/20241111-statmount-v4-0-2eaf35d07a80@kernel.org: fs: add the ability for statmount() to report the sb_source fs: add the ability for statmount() to report the fs_subtype fs: don't let statmount return empty strings Link: https://lore.kernel.org/r/20241111-statmount-v4-0-2eaf35d07a80@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/linux/mount.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/uapi/linux/mount.h b/include/uapi/linux/mount.h
index 225bc366ffcb..2b49e9131d77 100644
--- a/include/uapi/linux/mount.h
+++ b/include/uapi/linux/mount.h
@@ -173,7 +173,9 @@ struct statmount {
__u32 mnt_root; /* [str] Root of mount relative to root of fs */
__u32 mnt_point; /* [str] Mountpoint relative to current root */
__u64 mnt_ns_id; /* ID of the mount namespace */
- __u64 __spare2[49];
+ __u32 fs_subtype; /* [str] Subtype of fs_type (if any) */
+ __u32 sb_source; /* [str] Source string of the mount */
+ __u64 __spare2[48];
char str[]; /* Variable size part containing strings */
};
@@ -207,6 +209,8 @@ struct mnt_id_req {
#define STATMOUNT_FS_TYPE 0x00000020U /* Want/got fs_type */
#define STATMOUNT_MNT_NS_ID 0x00000040U /* Want/got mnt_ns_id */
#define STATMOUNT_MNT_OPTS 0x00000080U /* Want/got mnt_opts */
+#define STATMOUNT_FS_SUBTYPE 0x00000100U /* Want/got fs_subtype */
+#define STATMOUNT_SB_SOURCE 0x00000200U /* Want/got sb_source */
/*
* Special @mnt_id values that can be passed to listmount