From ec4beb5a2229159021298d56af16e18a9151fb4e Mon Sep 17 00:00:00 2001 From: SteveLauC Date: Sat, 18 May 2024 16:08:28 +0800 Subject: [PATCH] docs: correct limit value of FAN_UNLIMITED_QUEUE and FAN_UNLIMITED_MARKS[skip ci] (#2408) --- src/sys/fanotify.rs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/sys/fanotify.rs b/src/sys/fanotify.rs index 9ff306017d..a58bd5489d 100644 --- a/src/sys/fanotify.rs +++ b/src/sys/fanotify.rs @@ -96,9 +96,22 @@ libc_bitflags! { /// final data. FAN_CLASS_PRE_CONTENT; - /// Remove the limit of 16384 events for the event queue. + /// Remove the limit on the number of events in the event queue. + /// + /// Prior to Linux kernel 5.13, this limit was hardcoded to 16384. After + /// 5.13, one can change it via file `/proc/sys/fs/fanotify/max_queued_events`. + /// + /// See `fanotify(7)` for details about this limit. Use of this flag + /// requires the `CAP_SYS_ADMIN` capability. FAN_UNLIMITED_QUEUE; - /// Remove the limit of 8192 marks. + /// Remove the limit on the number of fanotify marks per user. + /// + /// Prior to Linux kernel 5.13, this limit was hardcoded to 8192 (per + /// group, not per user). After 5.13, one can change it via file + /// `/proc/sys/fs/fanotify/max_user_marks`. + /// + /// See `fanotify(7)` for details about this limit. Use of this flag + /// requires the `CAP_SYS_ADMIN` capability. FAN_UNLIMITED_MARKS; /// Make `FanotifyEvent::pid` return pidfd. Since Linux 5.15.