From: Andrew Morton <akpm@osdl.org>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: lkml-z@robsims.com, linux-kernel@vger.kernel.org
Subject: Re: Change in NFS client behavior
Date: Thu, 1 Sep 2005 21:07:55 -0700 [thread overview]
Message-ID: <20050901210755.607f3e4d.akpm@osdl.org> (raw)
In-Reply-To: <1125633145.8635.11.camel@lade.trondhjem.org>
Trond Myklebust <trond.myklebust@fys.uio.no> wrote:
>
> to den 01.09.2005 Klokka 20:45 (-0700) skreiv Andrew Morton:
> > Trond Myklebust <trond.myklebust@fys.uio.no> 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 do_truncate(dentry, length);
> > > +}
> >
> > We have the same optimisation in inode_setattr()...
>
> Look again. The two are NOT the same.
>
> The code in inode_setattr() will cause truncate() to erroneously update
> the ctime/mtime.
Of course. But with your patch, the optimisation in inode_setattr() is
redundant (except for O_TRUNC, perhaps).
next prev parent reply other threads:[~2005-09-02 4:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 14:55 Rob Sims
2005-09-01 23:38 ` Trond Myklebust
2005-09-02 3:43 ` Trond Myklebust
2005-09-02 3:45 ` Andrew Morton
2005-09-02 3:52 ` Trond Myklebust
2005-09-02 4:07 ` Andrew Morton [this message]
2005-09-02 4:15 ` Trond Myklebust
2005-09-02 4:19 ` Trond Myklebust
2005-09-02 4:38 ` Andrew Morton
2005-09-07 14:25 ` Rob Sims
2005-09-02 15:39 ` Rob Sims
2005-09-02 15:06 ` Drop NFS speed on move from kernel 2.4 to 2.6 (was: Change in NFS client behavior) Tomasz Kłoczko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050901210755.607f3e4d.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkml-z@robsims.com \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome