Re: NFS regression in 2.6
From: Andries Brouwer
Date: Tue Aug 19 2003 - 21:28:11 EST
On Tue, Aug 19, 2003 at 12:15:50PM -0700, Ulrich Drepper wrote:
> > I just tried NFS client 2.6.0-test3, NFS server 2.0.34, try test on client.
> > No problems. ftruncate did not fail.
> >
> > (Do you require some NFS version?)
>
> I have no special settings. It's an out-of-the-box RHL9 server setting,
> using NFSv3.
>
> Does the 2.0 kernel have NFSv3? That might be why you don't see it.
No it doesnt.
So, instead of testing let us just read the source.
I do not completely understand all details yet, but the
interesting parts seem to live in nfs/dir.c.
Since NFS v2/v3 is stateless, doing things with open fds will fail.
This deviation from Unix semantics is repaired by replacing an unlink
by a "silly rename".
Your testprogram works under 2.4 and fails under 2.6.
The conclusion is no doubt that 2.4 does the silly rename
and 2.6 does not.
Why not?
2.4 says
error = nfs_sillyrename(dir, dentry);
2.6 says
if (atomic_read(&dentry->d_count) > 1)
error = nfs_sillyrename(dir, dentry);
Your testprogram does a dup(), but that will not increment d_count,
so that is still 1 and 2.6 doesnt do the sillyrename.
[I must read further but have no time. Probably Trond will tell us
all details.]
Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/