Re: Change in NFS client behavior

2005-09-07 Thread Rob Sims
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: Fi

Re: Change in NFS client behavior

2005-09-02 Thread Rob Sims
On Thu, Sep 01, 2005 at 11:43:17PM -0400, Trond Myklebust wrote: > to den 01.09.2005 Klokka 19:38 (-0400) skreiv Trond Myklebust: > > This is a consequence of 2.6 NFS clients optimising away unnecessary > > truncate calls. Whereas this is correct behaviour for truncate(), it > > appears to be incor

Drop NFS speed on move from kernel 2.4 to 2.6 (was: Change in NFS client behavior)

2005-09-02 Thread Tomasz Kłoczko
On Wed, 31 Aug 2005, Rob Sims wrote: We have noticed when changing from kernel 2.4.23 to 2.6.8 that timestamps of files are not changed if opened for a write and nothing is written. When using 2.4.23 timestamps are changed. When using a local filesystem (reiserfs) with either kernel, timestamp

Re: Change in NFS client behavior

2005-09-01 Thread Andrew Morton
Trond Myklebust <[EMAIL PROTECTED]> wrote: > Looks good from a quick scan. > +static int do_posix_truncate(struct dentry *dentry, loff_t length) > +{ > +int err = 0; > +struct iattr newattrs; > + > +newattrs.ia_size = length; > +newattrs.ia_valid = ATTR_SIZE; > + > +do

Re: Change in NFS client behavior

2005-09-01 Thread Trond Myklebust
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 tha

Re: Change in NFS client behavior

2005-09-01 Thread Trond Myklebust
to den 01.09.2005 Klokka 21:07 (-0700) skreiv Andrew Morton: > Of course. But with your patch, the optimisation in inode_setattr() is > redundant (except for O_TRUNC, perhaps). Sure. The other problem is that the test is made before the i_sem is grabbed. OK, so how about the appended patch inste

Re: Change in NFS client behavior

2005-09-01 Thread Andrew Morton
Trond Myklebust <[EMAIL PROTECTED]> wrote: > > to den 01.09.2005 Klokka 20:45 (-0700) skreiv Andrew Morton: > > Trond Myklebust <[EMAIL PROTECTED]> wrote: > > > > > > +static inline int do_posix_truncate(struct dentry *dentry, loff_t > > > length) > > > +{ > > > +/* In SuS/Posix lore, t

Re: Change in NFS client behavior

2005-09-01 Thread Trond Myklebust
to den 01.09.2005 Klokka 20:45 (-0700) skreiv Andrew Morton: > Trond Myklebust <[EMAIL PROTECTED]> wrote: > > > > +static inline int do_posix_truncate(struct dentry *dentry, loff_t length) > > +{ > > + /* In SuS/Posix lore, truncate to the current file size is a no-op */ > > + if (length == i

Re: Change in NFS client behavior

2005-09-01 Thread Andrew Morton
Trond Myklebust <[EMAIL PROTECTED]> wrote: > > +static inline int do_posix_truncate(struct dentry *dentry, loff_t length) > +{ > +/* In SuS/Posix lore, truncate to the current file size is a no-op */ > +if (length == i_size_read(dentry->d_inode)) > +return 0; > +return

Re: Change in NFS client behavior

2005-09-01 Thread Trond Myklebust
to den 01.09.2005 Klokka 19:38 (-0400) skreiv Trond Myklebust: > This is a consequence of 2.6 NFS clients optimising away unnecessary > truncate calls. Whereas this is correct behaviour for truncate(), it > appears to be incorrect for open(O_TRUNC). > > In fact, local filesystems like xfs and ext3

Re: Change in NFS client behavior

2005-09-01 Thread Trond Myklebust
on den 31.08.2005 Klokka 08:55 (-0600) skreiv Rob Sims: > We have noticed when changing from kernel 2.4.23 to 2.6.8 that > timestamps of files are not changed if opened for a write and nothing is > written. When using 2.4.23 timestamps are changed. When using a local > filesystem (reiserfs) with

Change in NFS client behavior

2005-08-31 Thread Rob Sims
We have noticed when changing from kernel 2.4.23 to 2.6.8 that timestamps of files are not changed if opened for a write and nothing is written. When using 2.4.23 timestamps are changed. When using a local filesystem (reiserfs) with either kernel, timestamps are changed. Symptoms vary with the cl