Re: Fwd: struct inode size reduction.

Andries Brouwer (aebr@win.tue.nl)
Sun, 9 Mar 2003 18:13:14 +0100


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

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/