Re: [PATCH vfs 2/2] {block|char}_dev: remove inode->i_devices
From: Boaz Harrosh
Date: Tue Nov 18 2014 - 07:11:00 EST
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-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/