Re: daddr_t is inconsistent and barely used

Christoph Hellwig (hch@ns.caldera.de)
Thu, 16 Aug 2001 05:59:19 +0200


On Wed, Aug 15, 2001 at 11:52:37PM -0400, Albert D. Cahalan wrote:
> Christoph Hellwig writes:
> >>> In article <9980.997929632@kao2.melbourne.sgi.com> you wrote:
>
> >>>> The use of daddr_t in freevxfs may give different in core
> >>>> and disk layouts on different machines. Is that intended?.
> ...
> > vx_daddr_t is for disk structures, daddr_t for core.
>
> This is asking for trouble. The disk structures aren't about
> to change. See include/linux/ext2_fs.h for a safe way to do
> the on-disk structure. For the in-core stuff, "unsigned long"
> is a perfectly fine data type -- and yes I know it gets wider
> with a 64-bit system.

Please take a look how vx_daddr_t is defined - just because I prefer
descriptive names I am not stupid.

Christoph

> Don't forget to add explicit padding as needed to give natural alignment.

Thanks for you help, I have never worked with structure layouts before..

Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.
-
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/