linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Poetzl <herbert@13thfloor.at>
To: Jan Kara <jack@suse.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [BUG] mtime&ctime updated when it should not
Date: Mon, 1 Sep 2003 20:35:27 +0200	[thread overview]
Message-ID: <20030901183527.GB21251@DUK2.13thfloor.at> (raw)
In-Reply-To: <20030901181113.GA15672@atrey.karlin.mff.cuni.cz>

On Mon, Sep 01, 2003 at 08:11:13PM +0200, Jan Kara wrote:
>   Hello,
> 
>   one user pointed my attention to the fact that when the write fails
> (for example when the user quota is exceeded) the modification time is
> still updated (the problem appears both in 2.4 and 2.6). According to
> SUSv3 that should not happen because the specification says that mtime
> and ctime should be marked for update upon a successful completition
> of a write (not that it would forbid updating the times in other cases
> but I find it at least a bit nonintuitive).
>   The easiest fix would be probably to "backup" the times at the
> beginning of the write and restore the original values when the write
> fails (simply not updating the times would require more surgery because
> for example vmtruncate() is called when the write fails and it also
> updates the times).
>   So should I write the patch or is the current behaviour considered
> correct?

hmm, what if the request only partially succeeds?

for example echo "five" >/tmp/x will create /tmp/x
if inode limit permits it, but will leave it empty
if the space limit does not ...

personally I wouldn't care about the modification
time on such a quota fault ...

best,
Herbert

> 								Honza
> 
> -- 
> Jan Kara <jack@suse.cz>
> SuSE CR Labs

  reply	other threads:[~2003-09-01 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-01 18:11 [BUG] mtime&ctime updated when it should not Jan Kara
2003-09-01 18:35 ` Herbert Poetzl [this message]
2003-09-01 19:05   ` Jan Kara
2003-09-01 22:48   ` Mike Fedyk
2003-09-01 19:18 ` Andrew Morton
2003-09-01 19:31   ` Jan Kara
2003-09-01 19:58     ` Andrew Morton
2003-09-02 13:06       ` Jan Kara
2003-09-06  8:05         ` Pavel Machek

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=20030901183527.GB21251@DUK2.13thfloor.at \
    --to=herbert@13thfloor.at \
    --cc=jack@suse.cz \
    --cc=linux-kernel@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).