2.4.18 no timestamp update on modified mmapped files

From: Keith Owens (kaos@ocs.com.au)
Date: Tue Jun 11 2002 - 00:33:48 EST

fd = open("foo", O_RDWR);
map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
... modify the mapped pages ...
munmap(map, size);

The timestamp on foo is not updated, even though the contents have
changed. Adding msync(map, size, MS_[A]SYNC) before munmap makes no
difference. 2.4.19-pre10 has no obvious fixes for this problem.

I was tearing my hair out wondering why some files were not being
rsynced. No change on size or timestamp tells rsync that the file is
"unchanged". I had to add a dummy write(map, fd, 1) to force a
timestamp update.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:20 EST