Re: Ext2 defragmentation

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 16 Nov 1999 19:33:01 +0100


Matti Aarnio wrote:
> > > I have a dirent->d_type patch which I really should get on with
> > > submitting... Is anyone actually interested in it?
> >
> > Definitely --- ext2 is already maintaining the information, we might as
> > well use it.
>
> However instead of having kwazillion new readdir()/getdents()
> syscalls, lets merge that into LFS patch contained getdents64().

(a) I use no new syscalls. It is backward and forward compatible, and
more fields could be added if necessary. (I add them at the end of a
struct dirent, in an unambiguous and fast way).

(b) getdents64 is the wrong next generation syscall.

It should be getdirentries{,64} because every app calls Glibc's
readdir, and that calls getdirentries which currently does redundant
lseek syscalls.

(c) Is there any point in a 64-bit getdents/getdirentries?
I see no point in having 64-bit offsets into *directories*, and
64-bit inodes are unfortunately incompatible with Glibc.

(d) I could always stick bits 63-32 of d_fileno in that struct at the
end, still with no new syscall...

Summary: no new syscall required even for 64-bit inodes :-)

-- Jamie

-
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/