On Tue, 18 Mar 2008 09:11:54 -0700 (PDT) bugme-daemon@xxxxxxxxxxxxxxxxxxx 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@xxxxxxxx > ReportedBy: lasse-kernelbug-2008@xxxxxxxxxxxxxxxxxxxx > > > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html