Re: Fwd: struct inode size reduction.

Andries Brouwer
2003-03-09T17:02:37Z

On Sun, Mar 09, 2003 at 12:54:03PM -0100, Dave Jones wrote:
> Third retry, perhaps it'll make it through to the list
> now that vger is sending mail again...

> I've been running with this patch, with no untoward consequences,
> seems to pass basic testing here, any objections before I push
> this Linuswards ? Al ? Christoph ?
>
> --- bk-linus/include/linux/fs.h 2003-03-08 08:57:57.000000000 -0100
> +++ inode/include/linux/fs.h 2003-03-08 08:57:20.000000000 -0100
> @@ -382,12 +382,12 @@ struct inode {
> struct address_space *i_mapping;
> struct address_space i_data;
> struct dquot *i_dquot[MAXQUOTAS];
> - /* 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.
(And i_cdev can be deleted altogether, but that is an
independent matter.)

Andries