@@ -113,6 +113,7 @@ AC_CHECK_FUNCS_ONCE([ \
io_uring_register \
io_uring_enter \
kcmp \
+ listmount \
mallinfo \
mallinfo2 \
mallopt \
@@ -142,6 +143,7 @@ AC_CHECK_FUNCS_ONCE([ \
setns \
sigpending \
splice \
+ statmount \
statx \
stime \
sync_file_range \
@@ -232,6 +234,9 @@ AC_CHECK_TYPES([struct mount_attr],,,[
#endif
])
+AC_CHECK_TYPES([struct mnt_id_req],,,[#include <linux/mount.h>])
+AC_CHECK_TYPES([struct statmount],,,[#include <linux/mount.h>])
+
# Tools knobs
# Bash
@@ -2,12 +2,15 @@
/*
* Copyright (c) Linux Test Project, 2015-2022
* Copyright (c) 2015 Cui Bixuan <cuibixuan@huawei.com>
+ * Copyright (C) 2024 SUSE LLC Andrea Cervesato <andrea.cervesato@suse.com>
*/
#ifndef LAPI_MOUNT_H__
#define LAPI_MOUNT_H__
+#include <stdint.h>
#include <sys/mount.h>
+#include "config.h"
#ifndef MS_REC
# define MS_REC 16384
@@ -37,4 +40,71 @@
# define MS_NOSYMFOLLOW 256
#endif
+#ifndef HAVE_STRUCT_MNT_ID_REQ
+struct mnt_id_req {
+ uint32_t size;
+ uint32_t spare;
+ uint64_t mnt_id;
+ uint64_t param;
+};
+#endif
+
+#ifndef HAVE_STRUCT_STATMOUNT
+struct statmount {
+ uint32_t size;
+ uint32_t __spare1;
+ uint64_t mask;
+ uint32_t sb_dev_major;
+ uint32_t sb_dev_minor;
+ uint64_t sb_magic;
+ uint32_t sb_flags;
+ uint32_t fs_type;
+ uint64_t mnt_id;
+ uint64_t mnt_parent_id;
+ uint32_t mnt_id_old;
+ uint32_t mnt_parent_id_old;
+ uint64_t mnt_attr;
+ uint64_t mnt_propagation;
+ uint64_t mnt_peer_group;
+ uint64_t mnt_master;
+ uint64_t propagate_from;
+ uint32_t mnt_root;
+ uint32_t mnt_point;
+ uint64_t __spare2[50];
+ char str[];
+};
+#endif
+
+#ifndef MNT_ID_REQ_SIZE_VER0
+# define MNT_ID_REQ_SIZE_VER0 24
+#endif
+
+#ifndef STATMOUNT_SB_BASIC
+# define STATMOUNT_SB_BASIC 0x00000001U
+#endif
+
+#ifndef STATMOUNT_MNT_BASIC
+# define STATMOUNT_MNT_BASIC 0x00000002U
+#endif
+
+#ifndef STATMOUNT_PROPAGATE_FROM
+# define STATMOUNT_PROPAGATE_FROM 0x00000004U
+#endif
+
+#ifndef STATMOUNT_MNT_ROOT
+# define STATMOUNT_MNT_ROOT 0x00000008U
+#endif
+
+#ifndef STATMOUNT_MNT_POINT
+# define STATMOUNT_MNT_POINT 0x00000010U
+#endif
+
+#ifndef STATMOUNT_FS_TYPE
+# define STATMOUNT_FS_TYPE 0x00000020U
+#endif
+
+#ifndef LSMT_ROOT
+# define LSMT_ROOT 0xffffffffffffffff
+#endif
+
#endif /* LAPI_MOUNT_H__ */
@@ -95,7 +95,11 @@ struct statx {
uint32_t stx_dev_major;
uint32_t stx_dev_minor;
/* 0x90 */
- uint64_t __spare2[14];
+ __u64 stx_mnt_id;
+ __u32 stx_dio_mem_align;
+ __u32 stx_dio_offset_align;
+ /* 0xa0 */
+ __u64 __spare3[12];
/* 0x100 */
};
#endif
@@ -229,4 +233,8 @@ static inline int statx(int dirfd, const char *pathname, unsigned int flags,
# define STATX_ATTR_VERITY 0x00100000
#endif
+#ifndef STATX_MNT_ID_UNIQUE
+# define STATX_MNT_ID_UNIQUE 0x00004000U
+#endif
+
#endif /* LAPI_STAT_H__ */
@@ -297,4 +297,6 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
_sysctl 1078
@@ -317,3 +317,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -395,3 +395,5 @@ faccessat2 (__NR_SYSCALL_BASE+439)
epoll_pwait2 (__NR_SYSCALL_BASE+441)
quotactl_fd (__NR_SYSCALL_BASE+443)
futex_waitv (__NR_SYSCALL_BASE+449)
+statmount (__NR_SYSCALL_BASE+457)
+listmount (__NR_SYSCALL_BASE+458)
@@ -44,3 +44,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -431,3 +431,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -344,3 +344,5 @@ faccessat2 1463
epoll_pwait2 1465
quotactl_fd 1467
futex_waitv 1473
+statmount 1481
+listmount 1482
@@ -305,3 +305,5 @@ memfd_secret 447
process_mrelease 448
futex_waitv 449
set_mempolicy_home_node 450
+statmount 457
+listmount 458
@@ -371,3 +371,5 @@ epoll_pwait2 6441
mount_setattr 6442
quotactl_fd 6443
futex_waitv 6449
+statmount 6457
+listmount 6458
@@ -347,3 +347,5 @@ epoll_pwait2 5441
mount_setattr 5442
quotactl_fd 5443
futex_waitv 5449
+statmount 5457
+listmount 5458
@@ -417,3 +417,5 @@ epoll_pwait2 4441
mount_setattr 4442
quotactl_fd 4443
futex_waitv 4449
+statmount 4457
+listmount 4458
@@ -424,3 +424,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -424,3 +424,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -411,3 +411,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -359,3 +359,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -405,3 +405,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -410,3 +410,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -375,3 +375,5 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
@@ -352,6 +352,8 @@ faccessat2 439
epoll_pwait2 441
quotactl_fd 443
futex_waitv 449
+statmount 457
+listmount 458
rt_sigaction 512
rt_sigreturn 513
ioctl 514