aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sys
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-06-24 16:59:15 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-07-05 10:08:48 -0300
commit7eae6a91e9b1670330c9f15730082c91c0b1d570 (patch)
tree30dd281514d4db8ff1a64c288ec99d374bf4f0f1 /sysdeps/unix/sysv/linux/sys
parent05844d18f7893bf96965f163c428214fd5ebe10a (diff)
downloadglibc-7eae6a91e9b1670330c9f15730082c91c0b1d570.tar
glibc-7eae6a91e9b1670330c9f15730082c91c0b1d570.tar.gz
glibc-7eae6a91e9b1670330c9f15730082c91c0b1d570.tar.bz2
glibc-7eae6a91e9b1670330c9f15730082c91c0b1d570.zip
linux: Add fsconfig
It was added on Linux 5.2 (ecdab150fddb42fe6a739335257949220033b782) as a way to a configure filesystem creation context and trigger actions upon it, to be used in conjunction with fsopen, fspick and fsmount. The fsconfig_command commands are currently only defined as an enum, so they can't be checked on tst-mount-consts.py with current test support. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/unix/sysv/linux/sys')
-rw-r--r--sysdeps/unix/sysv/linux/sys/mount.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
index 50ec65c7a3..ef2c72f31c 100644
--- a/sysdeps/unix/sysv/linux/sys/mount.h
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
@@ -163,6 +163,27 @@ enum
#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
#define MOVE_MOUNT_SET_GROUP 0x00000100 /* Set sharing group instead */
+/* The type of fsconfig call made. */
+enum fsconfig_command
+{
+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+#define FSCONFIG_SET_FLAG FSCONFIG_SET_FLAG
+ FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
+#define FSCONFIG_SET_STRING FSCONFIG_SET_STRING
+ FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
+#define FSCONFIG_SET_BINARY FSCONFIG_SET_BINARY
+ FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
+#define FSCONFIG_SET_PATH FSCONFIG_SET_PATH
+ FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
+#define FSCONFIG_SET_PATH_EMPTY FSCONFIG_SET_PATH_EMPTY
+ FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
+#define FSCONFIG_SET_FD FSCONFIG_SET_FD
+ FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
+#define FSCONFIG_CMD_CREATE FSCONFIG_CMD_CREATE
+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
+#define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
+};
+
__BEGIN_DECLS
@@ -193,6 +214,11 @@ extern int move_mount (int __from_dfd, const char *__from_pathname,
int __to_dfd, const char *__to_pathname,
unsigned int flags) __THROW;
+/* Set parameters and trigger CMD action on the FD context. KEY, VALUE,
+ and AUX are used depending ng of the CMD. */
+extern int fsconfig (int __fd, unsigned int __cmd, const char *__key,
+ const void *__value, int __aux) __THROW;
+
__END_DECLS
#endif /* _SYS_MOUNT_H */