History

Merge tag 'for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs

Pull fsnotify updates from Jan Kara: "Amir's patches to implement superblock fanotify watches, Xiaoming's patch to enable reporting of thread IDs in fanotify events instead of TGIDs (sadly the patch got mis-attributed to Amir and I've noticed only now), and a fix of possible oops on umount caused by fsnotify infrastructure" * tag 'for_v4.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fsnotify: Fix busy inodes during unmount fs: group frequently accessed fields of struct super_block together fanotify: support reporting thread id instead of process id fanotify: add BUILD_BUG_ON() to count the bits of fanotify constants fsnotify: convert runtime BUG_ON() to BUILD_BUG_ON() fanotify: deprecate uapi FAN_ALL_* constants fanotify: simplify handling of FAN_ONDIR fsnotify: generalize handling of extra event flags fanotify: fix collision of internal and uapi mark flags fanotify: store fanotify_init() flags in group's fanotify_data fanotify: add API to attach/detach super block mark fsnotify: send path type events to group with super block marks fsnotify: add super block object type

Linus Torvalds committed 8 years ago

Commit 79257512 parents 7da4221 721fb6f13 files · +267 −122Browse files

Showing the changes to include/uapi/linux (1 of 13 files). Show all

Unified · Split

include/uapi/linux/fanotify.h+18−7
@@ -27,10 +27,12 @@ · 26 unmodified lines
2727 #define FAN_CLOEXEC 0x00000001
2828 #define FAN_NONBLOCK 0x00000002
2929
30−/* These are NOT bitwise flags. Both bits are used togther. */
30+/* These are NOT bitwise flags. Both bits are used together. */
3131 #define FAN_CLASS_NOTIF 0x00000000
3232 #define FAN_CLASS_CONTENT 0x00000004
3333 #define FAN_CLASS_PRE_CONTENT 0x00000008
34+
35+/* Deprecated - do not use this in programs and do not add new flags here! */
3436 #define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \
3537 FAN_CLASS_PRE_CONTENT)
3638
@@ -38,6 +40,10 @@ · 1 unmodified line
3840 #define FAN_UNLIMITED_MARKS 0x00000020
3941 #define FAN_ENABLE_AUDIT 0x00000040
4042
43+/* Flags to determine fanotify event format */
44+#define FAN_REPORT_TID 0x00000100 /* event->pid is thread id */
45+
46+/* Deprecated - do not use this in programs and do not add new flags here! */
4147 #define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
4248 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE |\
4349 FAN_UNLIMITED_MARKS)
@@ -47,11 +53,18 @@ · 3 unmodified lines
4753 #define FAN_MARK_REMOVE 0x00000002
4854 #define FAN_MARK_DONT_FOLLOW 0x00000004
4955 #define FAN_MARK_ONLYDIR 0x00000008
50−#define FAN_MARK_MOUNT 0x00000010
56+/* FAN_MARK_MOUNT is 0x00000010 */
5157 #define FAN_MARK_IGNORED_MASK 0x00000020
5258 #define FAN_MARK_IGNORED_SURV_MODIFY 0x00000040
5359 #define FAN_MARK_FLUSH 0x00000080
60+/* FAN_MARK_FILESYSTEM is 0x00000100 */
5461
62+/* These are NOT bitwise flags. Both bits can be used togther. */
63+#define FAN_MARK_INODE 0x00000000
64+#define FAN_MARK_MOUNT 0x00000010
65+#define FAN_MARK_FILESYSTEM 0x00000100
66+
67+/* Deprecated - do not use this in programs and do not add new flags here! */
5568 #define FAN_ALL_MARK_FLAGS (FAN_MARK_ADD |\
5669 FAN_MARK_REMOVE |\
5770 FAN_MARK_DONT_FOLLOW |\
@@ -61,11 +74,7 @@ · 3 unmodified lines
6174 FAN_MARK_IGNORED_SURV_MODIFY |\
6275 FAN_MARK_FLUSH)
6376
64−/*
65− * All of the events - we build the list by hand so that we can add flags in
66− * the future and not break backward compatibility. Apps will get only the
67− * events that they originally wanted. Be sure to add new events here!
68− */
77+/* Deprecated - do not use this in programs and do not add new flags here! */
6978 #define FAN_ALL_EVENTS (FAN_ACCESS |\
7079 FAN_MODIFY |\
7180 FAN_CLOSE |\
@@ -74,9 +83,11 @@ · 2 unmodified lines
7483 /*
7584 * All events which require a permission response from userspace
7685 */
86+/* Deprecated - do not use this in programs and do not add new flags here! */
7787 #define FAN_ALL_PERM_EVENTS (FAN_OPEN_PERM |\
7888 FAN_ACCESS_PERM)
7989
90+/* Deprecated - do not use this in programs and do not add new flags here! */
8091 #define FAN_ALL_OUTGOING_EVENTS (FAN_ALL_EVENTS |\
8192 FAN_ALL_PERM_EVENTS |\
8293 FAN_Q_OVERFLOW)