linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>, Al Viro <viro@ZenIV.linux.org.uk>
Cc: bugme-daemon@bugzilla.kernel.org,
	lasse-kernelbug-2008@mail.plastictree.net
Subject: Re: [Bugme-new] [Bug 10276] New: directory ctime not updated by rename
Date: Tue, 18 Mar 2008 10:00:23 -0700	[thread overview]
Message-ID: <20080318100023.1e047627.akpm@linux-foundation.org> (raw)
In-Reply-To: <bug-10276-10286@http.bugzilla.kernel.org/>

On Tue, 18 Mar 2008 09:11:54 -0700 (PDT) bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=10276
> 
>            Summary: directory ctime not updated by rename
>            Product: File System
>            Version: 2.5
>      KernelVersion: 2.6.24.3
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: ext3
>         AssignedTo: akpm@osdl.org
>         ReportedBy: lasse-kernelbug-2008@mail.plastictree.net
> 
> 
> Latest working kernel version:
> Earliest failing kernel version:
> Distribution: LFS
> Hardware Environment: 32bit x86
> Software Environment:
> Problem Description: Renaming a file into a directory so that an already
> existing file is overwritten, will not update the ctime on the directory. This
> seems to be the reason for certain failures with incremental backups (e.g.,
> with star).
> 
> Steps to reproduce:
> 
> Run the following commands and watch the output from stat. Upon the second run
> of rename, the ctime is not updated on the directory sub.
> 
> rm -fr sub new &&
> mkdir sub &&
> stat sub &&
> sleep 2 &&
> echo running rename &&
> ./rename a &&
> stat sub &&
> sleep 2 &&
> echo running rename again &&
> ./rename b &&
> stat sub
> 
> 
> Here is rename.c:
> 
> #include <unistd.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <sys/stat.h>
> 
> int main(int argc, char** argv) {
>         int fd;
> 
>         fd = open("new", O_WRONLY | O_NDELAY | O_TRUNC | O_CREAT, 0644);        
>         write(fd, argv[1], 1);
>         close(fd);
>         rename("new", "sub/x");
> 
>         return 0;
> }
> 

Do we agree that this is a bug?  If so, is it a VFS thing or a per-fs
thing?

Thanks.


       reply	other threads:[~2008-03-18 17:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-10276-10286@http.bugzilla.kernel.org/>
2008-03-18 17:00 ` Andrew Morton [this message]
2008-03-18 17:46   ` [Bugme-new] [Bug 10276] New: directory ctime not updated by rename Al Viro
2008-03-18 17:53     ` Al Viro
2008-03-18 17:54     ` Andrew Morton
2008-03-20  3:36     ` hooanon05

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=20080318100023.1e047627.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=hch@lst.de \
    --cc=lasse-kernelbug-2008@mail.plastictree.net \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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).