> > > where did the extra bit go ? the value 0x7FFFFFFFUL is
> hardcoded into the
> > > kernel sources for ext2, with no indication as to why this so.
> > Thats the max signed long, ie. half the max unsigned long.
> Jeez J. give me a break - I know what it is - I'm wondering why it is !
> I've looked in the sources (not very intensively, I admit) and I can't see
> why a signed long is used.
VMS has a similar limit (where a signed long was used rather than
an unsigned). Earlier versions used to have a smaller limit, but
when they redesigned the offending bits of the file system, they
decided to leave the limit as the max signed value, rather than
unsigned to avoid any bugs in applications that were (incorrectly)
using signed arithmetic.
Admittedly, there is less of a case for stuff like this in a Open-Source
world, but the reasoning might be similar.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!