Re: Fwd: struct inode size reduction.

Dave Jones
2003-03-09T19:25:47Z

On Sun, Mar 09, 2003 at 06:13:14PM +0100, Andries Brouwer wrote:

> > - /* These three should probably be a union */
> > struct list_head i_devices;
> > - struct pipe_inode_info *i_pipe;
> > - struct block_device *i_bdev;
> > - struct char_device *i_cdev;
> > -
> > + union {
> > + struct pipe_inode_info *i_pipe;
> > + struct block_device *i_bdev;
> > + struct char_device *i_cdev;
> > + } type;
>
> Not really any objection, but this is half work where
> more can be done. The comment is right: also i_devices
> can go into the union.

The different size types threw me, and I figured it
was a misplaced comment. It certainly made more sense
that way when it mentioned 'these three' rather than
'these four'. looking at bd_acquire I'm not so sure
it's as simple a job as the other three were.

> (And i_cdev can be deleted altogether, but that is an
> independent matter.)

There still seems to be some users of that, so I'll
leave that to a follow up patch, (or someone else who
really knows whats going on there).

Dave