lkml.org 
[lkml]   [2014]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH vfs 2/2] {block|char}_dev: remove inode->i_devices
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


\
 
 \ /
  Last update: 2014-11-18 13:41    [W:0.214 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site