Re: Ok, making ready for pre-2.4 and code-freeze..

Linus Torvalds (torvalds@transmeta.com)
Sun, 19 Dec 1999 20:10:57 -0800 (PST)


On Sun, 19 Dec 1999, Benjamin C.R. LaHaise wrote:
>
> Well, here's one that affects >32bit files on 32bit platforms...

Ben, your patch does not help anything at all, in fact it makes things
worse. You use "loff_t" for b_off, but then the other things (notably
"offset") arestill done with 32-bit arithmetic, and that causes the whole
math to just go bad.

For example, look at

b_off = iblock << ISOFS_BUFFER_BITS(inode);

which will do the shift in 32 bits, and then store that (potentially
truncated) value into a 64-bit entity. Useless - sure, you have the
storage, but you lost all the bits of precision anyway..

Either it should _all_ be done in loff_t (ugly and unnecessary) or the
logic should just be changed to do the arithmetic in _blocks_. The logic
really is a block logic anyway, and it's fairly stupid and unnecessary to
convert it to byte offsets for the calculations.

So what should happen in isofs is that we shift the size DOWN by
ISOFS_BUFFER_BITS instead of shifting the block UP. Sure, there's a
section size thing that is in bytes, but it could trivially be handled by
a "block + offset" calculation (although I personally suspect that the
section size is always block-aligned anyway, but who knows..)

Anybody willing to fix this up properly? Ben?

Linus

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