diff options
author | Eric Paris <eparis@redhat.com> | 2010-10-28 17:21:56 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-10-28 17:22:13 -0400 |
commit | 6ad2d4e3e97ee4bfde0b45e8dfe37911330fc4aa (patch) | |
tree | 6a4b98f659a886147088a983170fa75e5113f017 /include | |
parent | 9343919c1495b085a4a1cf4cbada8d7888daf099 (diff) | |
download | linux-6ad2d4e3e97ee4bfde0b45e8dfe37911330fc4aa.tar.bz2 |
fsnotify: implement ordering between notifiers
fanotify needs to be able to specify that some groups get events before
others. They use this idea to make sure that a hierarchical storage
manager gets access to files before programs which actually use them. This
is purely infrastructure. Everything will have a priority of 0, but the
infrastructure will exist for it to be non-zero.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fsnotify_backend.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index e40190d16878..825329534162 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -129,6 +129,14 @@ struct fsnotify_group { wait_queue_head_t notification_waitq; /* read() on the notification file blocks on this waitq */ unsigned int q_len; /* events on the queue */ unsigned int max_events; /* maximum events allowed on the list */ + /* + * Valid fsnotify group priorities. Events are send in order from highest + * priority to lowest priority. We default to the lowest priority. + */ + #define FS_PRIO_0 0 /* normal notifiers, no permissions */ + #define FS_PRIO_1 1 /* fanotify content based access control */ + #define FS_PRIO_2 2 /* fanotify pre-content access */ + unsigned int priority; /* stores all fastpath marks assoc with this group so they can be cleaned on unregister */ spinlock_t mark_lock; /* protect marks_list */ |