Re: Change in NFS client behavior

From: Rob Sims
Date: Wed Sep 07 2005 - 09:26:13 EST


On Fri, Sep 02, 2005 at 12:19:07AM -0400, Trond Myklebust wrote:
> fr den 02.09.2005 Klokka 00:15 (-0400) skreiv Trond Myklebust:
>
> > Sure. The other problem is that the test is made before the i_sem is
> > grabbed. OK, so how about the appended patch instead?
>
> Doh!
>
> Trond

> VFS/NFS: Fix up behaviour w.r.t. truncate() and open(O_TRUNC)
>
> POSIX and the SUSv3 specify that open(O_TRUNC) should always bump ctime/mtime
> whereas truncate() should only do so if the file size actually changes.
>
> Fix the behaviour of NFS, which currently is broken w.r.t. open(), and fix
> the VFS truncate() so that it no enforces the POSIX rules.
>
> Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
> ---
> attr.c | 14 +++-----------
> nfs/inode.c | 5 -----
> open.c | 25 +++++++++++++++++++++++--
> 3 files changed, 26 insertions(+), 18 deletions(-)

This patch does not fix the original issue - timestamps are not updated
as expected.
--
Rob
-
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/