> Unionfs persistent inode number feature is a very good idea and very
> important, especially very effective in these cases.

And it should be able to act like "pseudo hardlink."
With this patch, it can.

This sample shows the problem of "same inode number, but diffrent actually."
I thought it is a limit of unionfs. But with a help of persistent ino, I
think this matter is not a problem anymore.


unionfs on /dev/shm/u type unionfs 
(rw,dirs=rw=rw:ro=ro,imap=/dev/shm/fwd:/dev/shm/rev.rw:/dev/shm/rev.ro)
$ cd /dev/shm/u
$ find .. -name a -o -name b
../u/a
../u/b
../ro/a
../ro/b
$ ls -li ../ro/a ../ro/b
29 -rw-r--r--  2 jro jro 0 Jan 19 08:57 ../ro/a
29 -rw-r--r--  2 jro jro 0 Jan 19 08:57 ../ro/b
$ ls -li a b
22 -rw-r--r--  2 jro jro 0 Jan 19 08:57 a
22 -rw-r--r--  2 jro jro 0 Jan 19 08:57 b
$ echo abc >> a
$ ls -li a b
22 -rw-r--r--  1 jro jro 4 Jan 19 08:57 a
22 -rw-r--r--  1 jro jro 0 Jan 19 08:57 b
$ diff a b
1d0
< abc


Junjiro Okajima


diff -u -p -r1.1 -r1.2
--- unionfs-20060117-2031/dentry.c      18 Jan 2006 03:02:19 -0000      1.1
+++ unionfs-20060117-2031/dentry.c      18 Jan 2006 16:39:33 -0000      1.2
@@ -162,8 +162,8 @@ int unionfs_d_revalidate(struct dentry *
 
        if (!dentry->d_inode)
                invalid = 1;
-       if (!invalid && dtohd(dentry) && dtohd(dentry)->d_inode)
-               fist_copy_attr_all(dentry->d_inode, dtohd(dentry)->d_inode);
+       if (!invalid && dtohd(dentry) && itohi(dentry->d_inode))
+               fist_copy_attr_all(dentry->d_inode, itohi(dentry->d_inode));
 
       out:
        if (locked)
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to