Hi Amir! On Sun 01-03-20 18:26:25, Amir Goldstein wrote: > > > I'd rather do the fanotity_fh padding optimization I outlined in another > > > email. That would save one long without any packing and the following u8 > > > name_len would get packed tightly after the fanotify_fh by the compiler. > > > > > > > OK. I will try that and the non-inherited variant of perm/name event struct > > and see how it looks like. > > > > Pushed sample code to branch fanotify_name-wip: > > b5e56d3e1358 fanotify: fanotify_perm_event inherits from fanotify_path_event > 55041285b3b7 fanotify: divorce fanotify_path_event and fanotify_fid_event Thanks for the work! > I opted for fanotify_name_event inherits from fanotify_fid_event, > because it felt better this way. I've commented on github in the patches - I'm not sure the inheritance really brings a significant benefit and it costs 6 bytes per name event. Maybe there can be more simplifications gained from the inheritance (but I think the move of fsid out of fanotify_fid mostly precludes that) but at this point it doesn't seem to be worth it to me. > I wasn't sure about fanotify_perm_event inherits from fanotify_path_event, > so did that is a separate patch so you can judge both variants. > IMO, neither variant is that good or bad, so I could go with either. Yeah, I don't think the inheritance is really worth the churn. > I do like the end result with your suggestions better than fanotify_name-v2. > If you like this version, I will work the changes into the series. Yes, overall the code look better! Thanks! Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR