]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - include/linux/fanotify.h
fanotify: allow userspace to flush all marks
[net-next-2.6.git] / include / linux / fanotify.h
index 63531a6b4d2a0e42759dbe1a224a103afec1327a..a97c96d28c07b64d4717bc65a341f4ed4a59fe91 100644 (file)
 #define FAN_CLOEXEC            0x00000001
 #define FAN_NONBLOCK           0x00000002
 
-#define FAN_ALL_INIT_FLAGS     (FAN_CLOEXEC | FAN_NONBLOCK)
+/* These are NOT bitwise flags.  Both bits are used togther.  */
+#define FAN_CLASS_NOTIF                0x00000000
+#define FAN_CLASS_CONTENT      0x00000004
+#define FAN_CLASS_PRE_CONTENT  0x00000008
+
+#define FAN_ALL_CLASS_BITS     (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \
+                                FAN_CLASS_PRE_CONTENT)
+
+#define FAN_ALL_INIT_FLAGS     (FAN_CLOEXEC | FAN_NONBLOCK | \
+                                FAN_ALL_CLASS_BITS)
 
 /* flags used for fanotify_modify_mark() */
 #define FAN_MARK_ADD           0x00000001
@@ -43,7 +52,8 @@
                                 FAN_MARK_ONLYDIR |\
                                 FAN_MARK_MOUNT |\
                                 FAN_MARK_IGNORED_MASK |\
-                                FAN_MARK_IGNORED_SURV_MODIFY)
+                                FAN_MARK_IGNORED_SURV_MODIFY |\
+                                FAN_MARK_FLUSH)
 
 /*
  * All of the events - we build the list by hand so that we can add flags in
 struct fanotify_event_metadata {
        __u32 event_len;
        __u32 vers;
-       __u64 mask;
+       __aligned_u64 mask;
        __s32 fd;
        __s32 pid;
-} __attribute__ ((packed));
+};
 
 struct fanotify_response {
        __s32 fd;