Re: :Redhat [Bug 30944] - Kernel 2.4.0 and Kernel 2.2.18: with some programs

Trond Myklebust
2001-03-08T19:50:08Z

>>>>> " " == Alan Cox <alan@lxorguk.ukuu.org.uk> writes:

> Irix at least used to have an export option to do mappings to
> keep clients that had 32/64bit inode problems happy. Do those
> help ?

No. The problem here is a Linux one: NFS uses 32/64-bit unsigned
cookies, whereas glibc expects 64-bit *signed* offsets. Even with the
'32bitclients' export option, IRIX spits out cookies such as
'0xfeebdaed'. These confuse glibc because the VFS exports most of them
as 32-bit offsets that are sign-extended to 64-bits (the one exception
to this rule being the last dirent in the series which gets filled
directly with the 64-bit file->f_pos).

My last patch for this simply ensures that the NFS layer does a
pseudo-'64-bit sign extension' on such cookies:

cookie --> (0xffffffff00000000 ^ cookie)

This mimics what happens in filldir64() for all cookies, and is of
course reversible due to the use of xor.

I've been testing it out at Connectathon, and it does indeed seem to
work as expected...

Cheers,
Trond