Re: Fwd: struct inode size reduction.

J.A. Magallon
2003-03-09T22:35:16Z

On 03.09, Dave Jones wrote:
> Third retry, perhaps it'll make it through to the list
> now that vger is sending mail again...
>

If you do not need gcc-2.95 support, you can use anonymous unions:

+ union {
+ struct pipe_inode_info *i_pipe;
+ struct block_device *i_bdev;
+ struct char_device *i_cdev;
+ };

so you don't even have to change the accesses. Zero cost optimization patch.

I have tested on gcc-3.0, 3.2.2, RH gcc-2.96-98, and 2.95.2. Only 2.95.2
fails.

I do not know the compiler requirements for 2.5, or if there is any agreement
in kernel developement for not doing this. If this is the case, sorry for
the noise.

--
J.A. Magallon <jamagallon@able.es> \ Software is like sex:
werewolf.able.es \ It's better when it's free
Mandrake Linux release 9.1 (Cooker) for i586
Linux 2.4.21-pre5-jam0 (gcc 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk))