On Thu 27-02-20 14:12:30, Amir Goldstein wrote: > > > > > struct fanotify_fh_name { > > > union { > > > struct { > > > u8 fh_type; > > > u8 fh_len; > > > u8 name_len; > > > u32 hash; > > > }; > > > u64 hash_len; > > > }; > > > union { > > > unsigned char fh[FANOTIFY_INLINE_FH_LEN]; > > > unsigned char *ext_fh; > > > }; > > > char name[0]; > > > }; > > > > So based on the above I wouldn't add just name hash to fanotify_fh_name at > > this point... > > > > OK. but what do you think about tying name with fh as above? > At least name_len gets to use the hole this way. Is saving that one byte for name_len really worth the packing? If anything, 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. Honza -- Jan Kara <jack@xxxxxxxx> SUSE Labs, CR