linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: Andreas Dilger <adilger@clusterfs.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Why do we update ctime in generic_file_write?
Date: 22 Jan 2003 14:31:12 +0100	[thread overview]
Message-ID: <shs1y3548gv.fsf@charged.uio.no> (raw)
In-Reply-To: <20030121180007.B1594@schatzie.adilger.int>

>>>>> " " == Andreas Dilger <adilger@clusterfs.com> writes:

     > I was looking at the code in generic file write (both 2.4 and
     > 2.5) and in both cases we update the ctime always.  My
     > understanding here is that the mtime reflects the data
     > modification time, while the ctime reflects the inode change
     > time, so we should only be updating the ctime (at most) if the
     > file size was increased, and not if we are overwriting data.

See the Single UNIX Specification on
   http://www.opengroup.org/cgi-bin/sussearch.pl

st_ctime is always supposed to be updated whenever st_mtime is
(although the converse is not true).

Cheers,
  Trond

  reply	other threads:[~2003-01-22 13:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-22  1:00 Why do we update ctime in generic_file_write? Andreas Dilger
2003-01-22 13:31 ` Trond Myklebust [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-01-22  1:34 Steven French
2003-01-22  1:49 ` Andreas Dilger

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=shs1y3548gv.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=adilger@clusterfs.com \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).