Re: [PATCH v3 08/13] fsnotify: introduce prototype struct fsnotify_obj

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 20-04-18 16:10:56, Amir Goldstein wrote:
> struct inode and struct mount are both types of objects, which marks
> can be attached to. Let them "inherit" from a prototype struct, so that
> marks manipulation code can be made more generic.
> 
> Introduce helpers fsnotify_obj_{inode,mount} to get the concrete object
> from the abstract object.

...

> @@ -661,8 +660,7 @@ struct inode {
>  	__u32			i_generation;
>  
>  #ifdef CONFIG_FSNOTIFY
> -	__u32			i_fsnotify_mask; /* all events this inode cares about */
> -	struct fsnotify_mark_connector __rcu	*i_fsnotify_marks;
> +	struct fsnotify_obj	i_fsnotify;
>  #endif

So this grows struct inode by 8 bytes due to padding. I've made
struct fsnotify_obj packed (so that it's really 12 bytes and not 16) and
put i_generation after i_fsnotify_mask to avoid additional padding.

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux