Re: [PATCH vfs 2/2] {block|char}_dev: remove inode->i_devices

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

 



On 11/14/2014 12:11 AM, Tejun Heo wrote:
<>
> @@ -426,7 +427,7 @@ struct block_device {
>  	struct inode *		bd_inode;	/* will die */
>  	struct super_block *	bd_super;
>  	struct mutex		bd_mutex;	/* open/close mutex */
> -	struct list_head	bd_inodes;
> +	struct ptrset		bd_inodes;
>  	void *			bd_claiming;
>  	void *			bd_holder;
>  	int			bd_holders;
> @@ -609,7 +610,6 @@ struct inode {
>  #ifdef CONFIG_QUOTA
>  	struct dquot		*i_dquot[MAXQUOTAS];
>  #endif
> -	struct list_head	i_devices;
>  	union {
>  		struct pipe_inode_info	*i_pipe;
>  		struct block_device	*i_bdev;

You do know that you can completely dodge the bullet
by making i_devices a union with some other members.

If I understand correctly these are the init_special_inode()
	if (S_ISCHR(mode)) {
		inode->i_fop = &def_chr_fops;
		inode->i_rdev = rdev;
	} else if (S_ISBLK(mode)) {
		inode->i_fop = &def_blk_fops;
		inode->i_rdev = rdev;

Right? well if so than those special inodes do
not hold any data and never do IO of any kind
so all the inode members that are needed for IO
are candidates.
example: i_wb_list; i_lru; i_dio_count i_writecount
i_dquot (when QUOTA is on) i_private and more

Even union with the "cgroup writback support" you
want to add.

Hey interesting per-cpu code though I learned something ...
Thanks
Boaz
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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