* RE: [PATCH] htree nfs fix
@ 2003-05-14 0:23 Trond Myklebust
2003-05-14 0:44 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2003-05-14 0:23 UTC (permalink / raw)
To: akpm, tytso; +Cc: Linux Kernel
Get the facts right please: That rant was bullshit.
NFS tries as hard as it can to interpret the cookie as a bag of
bits. It gets screwed in this by a VFS interface which treats the
32-bit getdents() as having unsigned 32-bit cookies, and the 64-bit
getdents64() as having signed 64-bit cookies.
To make matters worse, glibc comes along and assumes it can use
getdents64 as a substitute for getdents() without having to give any
thought to the problem of cookies.
If you're unhappy with the state of readdir, then fix the VFS/glibc.
At the moment it is simply not possible to write a consistent readdir
at the NFS level.
Trond
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] htree nfs fix
2003-05-14 0:23 [PATCH] htree nfs fix Trond Myklebust
@ 2003-05-14 0:44 ` Andrew Morton
2003-05-14 9:05 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2003-05-14 0:44 UTC (permalink / raw)
To: trond.myklebust; +Cc: tytso, linux-kernel
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] htree nfs fix
2003-05-14 0:44 ` Andrew Morton
@ 2003-05-14 9:05 ` Trond Myklebust
2003-05-14 9:12 ` Andrew Morton
0 siblings, 1 reply; 5+ messages in thread
From: Trond Myklebust @ 2003-05-14 9:05 UTC (permalink / raw)
To: Andrew Morton; +Cc: tytso, linux-kernel
>>>>> " " == 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] htree nfs fix
2003-05-14 9:05 ` Trond Myklebust
@ 2003-05-14 9:12 ` Andrew Morton
2003-05-14 9:32 ` Trond Myklebust
0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2003-05-14 9:12 UTC (permalink / raw)
To: trond.myklebust; +Cc: tytso, linux-kernel
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
>
> >>>>> " " == 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)
>
Or we do nothing.
What would you recommend?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] htree nfs fix
2003-05-14 9:12 ` Andrew Morton
@ 2003-05-14 9:32 ` Trond Myklebust
0 siblings, 0 replies; 5+ messages in thread
From: Trond Myklebust @ 2003-05-14 9:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: tytso, linux-kernel
>>>>> " " == Andrew Morton <akpm@digeo.com> writes:
>> 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)
>>
> Or we do nothing.
> What would you recommend?
I frankly don't care. I consider the current situation to be a direct
result of glibc's abuse of getdents64() starting in glibc-2.2. If they
had used 32-bit interfaces for the 32-bit readdir() they way they did
in glibc-2.1 then there would be no 'NFS problem' for people to bitch
about.
Cheers,
Trond
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-05-14 9:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-14 0:23 [PATCH] htree nfs fix Trond Myklebust
2003-05-14 0:44 ` Andrew Morton
2003-05-14 9:05 ` Trond Myklebust
2003-05-14 9:12 ` Andrew Morton
2003-05-14 9:32 ` Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®