Re: [PATCH 4/4] fanotify: Expose the file changes to the user

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Alexey Zaytsev
Date: Monday, November 29, 2010 - 9:51 am

On Mon, Nov 29, 2010 at 19:14, Eric Paris <eparis@redhat.com> wrote:

Yep, except mask should go after options_offset to avoid the gap, and
let's make both vers and options_offset u8, just in case we need the
other 2 bytes in the future:

struct fanotify_event_metadata {
       __u32 event_len; /* Including the options */
       __u8 vers;
       __u8 options_offset; /* Aka header length */
       __u16 reserved;
       __aligned_u64 mask;
       __s32 fd;
       __s32 pid;
       /* Options go here. */
};


Actually, with event_len being __u32, and mask moved back, we are
already abi-compatible. The users would see the wrong version, but
it's always > 2, so everyone happy. Together with the hypothetical
huge options, this fully justifies spending 2 bytes on event_len to
me.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 0/4] Series short description, Alexey Zaytsev, (Sun Nov 21, 5:31 pm)
[PATCH 3/4] fsnotify: Handle the file change ranges, Alexey Zaytsev, (Sun Nov 21, 5:33 pm)
[PATCH 4/4] fanotify: Expose the file changes to the user, Alexey Zaytsev, (Sun Nov 21, 5:37 pm)
Re: [PATCH 4/4] fanotify: Expose the file changes to the user, Alexey Zaytsev, (Mon Nov 29, 9:51 am)