Tom <[EMAIL PROTECTED]> wonders:
> Hmmm... make me wonder why VFS wasn't fixed long, long ago then.
> Tom
The story is long, like Mark SCHAEFER here mentioned.
The problem sphere consists of many parts, these include:
- Passing file offset information around; 2.0 had a 'long' (which
size depends at the system processor; 32-bit ones have 32-bit
value space) passed as a parameter of the calls around the file
operation related calls, 2.1 (and thus 2.2) changed that to
'loff_t *' (e.g. a pointer to 64-bit integer object).
- Struct inode (or struct file?) carries active file size info,
that too used to be a 'long'.
These previous two used to be the main part of the VFS problems,
however more things need fixing:
- Page cache (and its precursor 'buffer cache' up to 2.0 series)
contains file offset information regarding where the page (or
buffer block) of the data is in the file.
This part is very speed critical to the overall system, and
using 64-bit value arithmetic with the register-poor i386
needs, shall we say, awfull binary code... therefore doing
larger than PAGE_SIZE * 4G file size support at 32-bit machines,
and especially at i386 series is likely outright unfeasible.
- Filesystems mostly support up to 32-bit file sizes, however
NFSv3 looms near (a high time for it), UFS and EXT2 both do
support sizes up to 64-bits in their i-nodes.
In case of EXT2 the code (as in 2.2) supports 64-bit file sizes
only at 64-bit processors -- because due to the page cache one
can't go beyond anyway (not that the syscall interfaces truly
allow it either at 32-bit systems..)
(and while UFS would "support" 64-bit sizes in all systems, that
would not in reality work because of the page cache..)
- A bunch of syscalls need 64-bit parameter passing versions.
As a final thing to fix, the user-space needs 64-bit offset
handling as well, which came around with glibc 2.1, however
my kernel patches, and the way how glibc 2.1 does stat()
structures does still need some tuning...
As a reference, see the work-in-progress (now a bit dormant
as my time is now needed elsewere for a while), see:
ftp://mea.tmt.tele.fi/linux/LFS/
/Matti Aarnio <[EMAIL PROTECTED]>