• Amir Goldstein's avatar
    fanotify: copy event fid info to user · 5e469c83
    Amir Goldstein authored
    If group requested FAN_REPORT_FID and event has file identifier,
    copy that information to user reading the event after event metadata.
    
    fid information is formatted as struct fanotify_event_info_fid
    that includes a generic header struct fanotify_event_info_header,
    so that other info types could be defined in the future using the
    same header.
    
    metadata->event_len includes the length of the fid information.
    
    The fid information includes the filesystem's fsid (see statfs(2))
    followed by an NFS file handle of the file that could be passed as
    an argument to open_by_handle_at(2).
    
    Cc: <linux-api@vger.kernel.org>
    Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
    Signed-off-by: default avatarJan Kara <jack@suse.cz>
    5e469c83
fanotify.h 3.81 KB