Lasse Kliemann | 18 Mar 2008 16:23

Re: refuse to update certain files upon extraction

* Message by -Joerg Schilling- from Tue 2008-03-18:

> The problem is a Linux kernel bug.
> 
> Any other backup tool (like e.g. dump/restore) will run into the same problem
> as Linux did not update the timestamp from the directory 
> "send-backup-test/log/supervise/".
> 
> You need to send a bug-report against Linux and get a fix for this problem....

I've already prepared a minimal example to prove this, see the attached 
files. The ctime of `sub' changes the first time that `rename' is run, but 
not the second. I also tried this on Solaris, and there the ctime is 
updated after the second run of `rename'.

Lasse

#!/bin/sh

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
#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;
}
_______________________________________________
Star-users mailing list
Star-users <at> lists.berlios.de
https://lists.berlios.de/mailman/listinfo/star-users

Gmane