After deleting a file, re-create the file. The timestamp of the file is
old. It is a unionfs unlink/create minor bug, related to creating
whiteout by rename.
In this exapmle, 'file' is older than 'file2' while 'file' is created
after 'file2'.
Here is a patch.

unionfs on /dev/shm/u type unionfs (rw,dirs=rw=rw:ro=ro,delete=all)
$ cd /dev/shm/u
$ ls -l --time-style=full-iso file file2
ls: file2: No such file or directory
-rw-r--r--  1 jro jro 4 2006-02-02 22:23:33.000000000 +0900 file
$ rm file
$ sleep 1
$ > file2
$ > file
$ ls -l --time-style=full-iso file file2
-rw-r--r--  1 jro jro 0 2006-02-02 22:23:33.000000000 +0900 file
-rw-r--r--  1 jro jro 0 2006-02-02 22:23:34.000000000 +0900 file2


Junjiro Okajima


--- unionfs-20060131-1742/inode.c       2 Feb 2006 09:05:26 -0000       1.1
+++ unionfs-20060131-1742/inode.c       2 Feb 2006 12:36:22 -0000       1.2
@@ -82,7 +82,8 @@ static int unionfs_create(struct inode *
                struct iattr newattrs;
 
                down(&whiteout_dentry->d_inode->i_sem);
-               newattrs.ia_valid = ATTR_CTIME | ATTR_MODE;
+               newattrs.ia_valid = ATTR_CTIME | ATTR_MODE | ATTR_ATIME
+                       | ATTR_MTIME;
                newattrs.ia_mode = mode;
                if (whiteout_dentry->d_inode->i_size != 0) {
                        newattrs.ia_valid |= ATTR_SIZE;
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to