Pull fsnotify updates from Jan Kara: "This implements the fanotify FAN_DIR_MODIFY event. This event reports the name in a directory under which a change happened and together with the directory filehandle and fstatat() allows reliable and efficient implementation of directory synchronization" * tag 'fsnotify_for_v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: fanotify: Fix the checks in fanotify_fsid_equal fanotify: report name info for FAN_DIR_MODIFY event fanotify: record name info for FAN_DIR_MODIFY event fanotify: Drop fanotify_event_has_fid() fanotify: prepare to report both parent and child fid's fanotify: send FAN_DIR_MODIFY event flavor with dir inode and name fanotify: divorce fanotify_path_event and fanotify_fid_event fanotify: Store fanotify handles differently fanotify: Simplify create_fd() fanotify: fix merging marks masks with FAN_ONDIR fanotify: merge duplicate events on parent and child fsnotify: replace inode pointer with an object id fsnotify: simplify arguments passing to fsnotify_parent() fsnotify: use helpers to access data by data_type fsnotify: funnel all dirent events through fsnotify_name() fsnotify: factor helpers fsnotify_dentry() and fsnotify_file() fsnotify: tidy up FS_ and FAN_ constants
Showing the changes to include/uapi/linux (1 of 12 files). Show all
Unified · Split
| @@ -24,10 +24,11 @@ · 23 unmodified lines | ||
| 24 | 24 | #define FAN_OPEN_PERM 0x00010000 /* File open in perm check */ |
| 25 | 25 | #define FAN_ACCESS_PERM 0x00020000 /* File accessed in perm check */ |
| 26 | 26 | #define FAN_OPEN_EXEC_PERM 0x00040000 /* File open/exec in perm check */ |
| 27 | +#define FAN_DIR_MODIFY 0x00080000 /* Directory entry was modified */ | |
| 27 | 28 | |
| 28 | −#define FAN_ONDIR 0x40000000 /* event occurred against dir */ | |
| 29 | +#define FAN_EVENT_ON_CHILD 0x08000000 /* Interested in child events */ | |
| 29 | 30 | |
| 30 | −#define FAN_EVENT_ON_CHILD 0x08000000 /* interested in child events */ | |
| 31 | +#define FAN_ONDIR 0x40000000 /* Event occurred against dir */ | |
| 31 | 32 | |
| 32 | 33 | /* helper events */ |
| 33 | 34 | #define FAN_CLOSE (FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE) /* close */ |
| @@ -116,6 +117,7 @@ struct fanotify_event_metadata { · 82 unmodified lines | ||
| 116 | 117 | }; |
| 117 | 118 | |
| 118 | 119 | #define FAN_EVENT_INFO_TYPE_FID 1 |
| 120 | +#define FAN_EVENT_INFO_TYPE_DFID_NAME 2 | |
| 119 | 121 | |
| 120 | 122 | /* Variable length info record following event metadata */ |
| 121 | 123 | struct fanotify_event_info_header { |
| @@ -124,7 +126,12 @@ struct fanotify_event_info_header { · 2 unmodified lines | ||
| 124 | 126 | __u16 len; |
| 125 | 127 | }; |
| 126 | 128 | |
| 127 | −/* Unique file identifier info record */ | |
| 129 | +/* | |
| 130 | + * Unique file identifier info record. This is used both for | |
| 131 | + * FAN_EVENT_INFO_TYPE_FID records and for FAN_EVENT_INFO_TYPE_DFID_NAME | |
| 132 | + * records. For FAN_EVENT_INFO_TYPE_DFID_NAME there is additionally a null | |
| 133 | + * terminated name immediately after the file handle. | |
| 134 | + */ | |
| 128 | 135 | struct fanotify_event_info_fid { |
| 129 | 136 | struct fanotify_event_info_header hdr; |
| 130 | 137 | __kernel_fsid_t fsid; |