Skip to content

Commit 920b91d

Browse files
committed
tools include UAPI: Sync linux/mount.h copy with the kernel sources
To pick the changes from: 6ac3928 ("fs: allow to mount beneath top mount") That, after a fix to the move_mount_flags.sh script, harvests the new MOVE_MOUNT_BENEATH move_mount flag: $ tools/perf/trace/beauty/move_mount_flags.sh > before $ cp include/uapi/linux/mount.h tools/include/uapi/linux/mount.h $ tools/perf/trace/beauty/move_mount_flags.sh > after $ $ diff -u before after --- before 2023-07-11 12:38:49.244886707 -0300 +++ after 2023-07-11 12:51:15.125255940 -0300 @@ -6,4 +6,5 @@ [ilog2(0x00000020) + 1] = "T_AUTOMOUNTS", [ilog2(0x00000040) + 1] = "T_EMPTY_PATH", [ilog2(0x00000100) + 1] = "SET_GROUP", + [ilog2(0x00000200) + 1] = "BENEATH", }; $ That will then be properly decoded when used in tools like: # perf trace -e move_mount This addresses this perf build warning: Warning: Kernel ABI header differences: diff -u tools/include/uapi/linux/mount.h include/uapi/linux/mount.h Cc: Christian Brauner <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Ian Rogers <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lore.kernel.org/lkml/ZK17kifP%[email protected]/ Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 225bbf4 commit 920b91d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

tools/include/uapi/linux/mount.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */
7575
#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
7676
#define MOVE_MOUNT_SET_GROUP 0x00000100 /* Set sharing group instead */
77-
#define MOVE_MOUNT__MASK 0x00000177
77+
#define MOVE_MOUNT_BENEATH 0x00000200 /* Mount beneath top mount */
78+
#define MOVE_MOUNT__MASK 0x00000377
7879

7980
/*
8081
* fsopen() flags.

tools/perf/trace/beauty/move_mount_flags.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fi
1010
linux_mount=${linux_header_dir}/mount.h
1111

1212
printf "static const char *move_mount_flags[] = {\n"
13-
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([^_]+_[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
13+
regex='^[[:space:]]*#[[:space:]]*define[[:space:]]+MOVE_MOUNT_([^_]+[[:alnum:]_]+)[[:space:]]+(0x[[:xdigit:]]+)[[:space:]]*.*'
1414
grep -E $regex ${linux_mount} | \
1515
sed -r "s/$regex/\2 \1/g" | \
1616
xargs printf "\t[ilog2(%s) + 1] = \"%s\",\n"

0 commit comments

Comments
 (0)