On Thu 04-03-21 12:48:24, Amir Goldstein wrote: > Improve the merge key hash by mixing more values relevant for merge. > > For example, all FAN_CREATE name events in the same dir used to have the > same merge key based on the dir inode. With this change the created > file name is mixed into the merge key. > > The object id that was used as merge key is redundant to the event info > so it is no longer mixed into the hash. > > Permission events are not hashed, so no need to hash their info. > > Signed-off-by: Amir Goldstein <amir73il@xxxxxxxxx> ... > @@ -530,6 +568,8 @@ static struct fanotify_event *fanotify_alloc_event(struct fsnotify_group *group, > struct inode *child = NULL; > bool name_event = false; > unsigned int hash = 0; > + unsigned long ondir = (mask & FAN_ONDIR) ? 1UL : 0; > + struct pid *pid; I've made a tiny change here and changed 'ondir' to bool since I don't see a strong reason to play games like this. Otherwise I took the patch as is. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR