aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fanotify.h
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2010-10-28 17:21:57 -0400
committerEric Paris <eparis@redhat.com>2010-10-28 17:22:14 -0400
commit5dd03f55fd2f21916ce248bb2e68bbfb39d94fe5 (patch)
tree3d4446ce07126b9983849a41670542c69bb400bd /include/linux/fanotify.h
parent2529a0df0f64dab1f60ae08e038b89c53a6b4c02 (diff)
fanotify: allow userspace to override max queue depth
fanotify has a defualt max queue depth. This patch allows processes which explicitly request it to have an 'unlimited' queue depth. These processes need to be very careful to make sure they cannot fall far enough behind that they OOM the box. Thus this flag is gated on CAP_SYS_ADMIN. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include/linux/fanotify.h')
-rw-r--r--include/linux/fanotify.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h
index ed479b6fef7b..e37f559c95e1 100644
--- a/include/linux/fanotify.h
+++ b/include/linux/fanotify.h
@@ -28,12 +28,13 @@
28#define FAN_CLASS_NOTIF 0x00000000 28#define FAN_CLASS_NOTIF 0x00000000
29#define FAN_CLASS_CONTENT 0x00000004 29#define FAN_CLASS_CONTENT 0x00000004
30#define FAN_CLASS_PRE_CONTENT 0x00000008 30#define FAN_CLASS_PRE_CONTENT 0x00000008
31
32#define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \ 31#define FAN_ALL_CLASS_BITS (FAN_CLASS_NOTIF | FAN_CLASS_CONTENT | \
33 FAN_CLASS_PRE_CONTENT) 32 FAN_CLASS_PRE_CONTENT)
34 33
34#define FAN_UNLIMITED_QUEUE 0x00000010
35
35#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \ 36#define FAN_ALL_INIT_FLAGS (FAN_CLOEXEC | FAN_NONBLOCK | \
36 FAN_ALL_CLASS_BITS) 37 FAN_ALL_CLASS_BITS | FAN_UNLIMITED_QUEUE)
37 38
38/* flags used for fanotify_modify_mark() */ 39/* flags used for fanotify_modify_mark() */
39#define FAN_MARK_ADD 0x00000001 40#define FAN_MARK_ADD 0x00000001