On Thu, 28 Nov 2024 at 17:44, Amir Goldstein <amir73il@xxxxxxxxx> wrote: > This sounds good, but do the watchers actually need this information > or is it redundant to parent_id? Everything but mnt_id is redundant, since they can be retrieved with statmount. I thought, why not use the existing infrastructure in the event? But it's not strictly needed. > If we are not sure that reporting fd/fid is needed, then we can limit > FAN_REPORT_MNTID | FAN_REPORT_*FID now and consider adding it later. > > WDYT? Sounds good. > You missed fanotify_should_merge(). IMO FAN_MNT_ events should never be merged > so not sure that mixing this data in the hash is needed. Okay. > I think if we do not HAVE TO mix mntid info and fid info, then we better > stick with event->fd + mntid and add those fields to fanotify_path_event. Okay. > See patch "fanotify: don't skip extra event info if no info_mode is set" > in Jan's fsnotify_hsm branch. > This should be inside copy_info_records_to_user(). Makes sense. I was wondering why copy_info_records_to_user() was called conditionally. Thanks, Miklos