Re: [PATCH] htree nfs fix

Trond Myklebust (trond.myklebust@fys.uio.no)
Wed, 14 May 2003 11:05:54 +0200


>>>>> " " == Andrew Morton <akpm@digeo.com> writes:

> Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
>>
>> If you're unhappy with the state of readdir, then fix the
>> VFS/glibc.

> What should be done?

Either we have to agree that we break legacy 32-bit getdents() and
treat all cookies as signed 32/64-bit, or we break getdents64(), and
treat all cookies as unsigned. (This applies to both 2.5.x and 2.4.x)

The former will (IIRC) break setups with those IRIX servers that like
to use 0xFFFFFFFF as an end-of-readdir marker. It also requires an
extra patch in order to mangle the otherwise unsigned NFS
cookies. (This patch has been ready but withheld from the official
kernel tree pending a decision on this issue for at least 2 years -
hence my irritation whenever this subject comes up)

The latter will break glibc, which likes to abuse getdents64() and
simply test for signed 32-bit overflow in place of using the 32-bit
getdents().

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