commit 6aa6dde75ae541f93049315ed345222fba7abc79
Author: Rachita Kothiyal <[EMAIL PROTECTED]>
Date: Sun Dec 16 13:13:21 2007 -0500
Unionfs ODF2: Documenting the export operations for Unionfs
Signed-off-by: Rachita Kothiyal <[EMAIL PROTECTED]>
diff --git a/Documentation/filesystems/unionfs/odf.txt
b/Documentation/filesystems/unionfs/odf.txt
index 198815e..03ee679 100644
--- a/Documentation/filesystems/unionfs/odf.txt
+++ b/Documentation/filesystems/unionfs/odf.txt
@@ -539,6 +539,42 @@ plus update /odf/ns as described, then link the dst to the
src. If someone
creates a new hardlink to an already copied up file, then we will see that
as existing info in /odf/ns.
+** Export Operations
+
+Unionfs mounted files can be exported over NFS. Following is a short
+description of how the export operations are implemented.
+
+* Filehandle Format:
+In addition to the inode number and generation, we also store the i_mode
+of the inode in the filehandle. This is needed when we do not find the
+unionfs inode in the inode cache and have to reconstruct it from scratch.
+This can also be derived from the corresponding lower level inodes, but
+if this object is disconnected, we will need to first reconnect all its
+ancestors. Instead, saving the i_mode in the filehandle is a much more
+convenient solution.
+
+* unionfs_encode_fh: Construct a filehandle corresponding to a dentry.
+- If dentry is a directory, fill in the dentry's inode number, generation
+ number and the inode's i_mode.
+- Else, fill in the inode number, generation and i_mode of the dentry and
+ its parent.
+
+* unionfs_fh_to_dentry: Reconstruct a dentry from the filehandle
+- Get a unionfs inode for the inode number and create a dentry.
+- Fill in the mode for the inode from the i_mode encoded in the filehandle.
+
+* unionfs_fh_to_parent: Reconstruct a dentry's parent from the filehandle
+- Similar to unionfs_fh_to_dentry
+
+* unionfs_get_name: Get the name for a unionfs dentry
+- Look for the dentry in its parents directory in odf, and hence obtain its
+ name.
+
+* unionfs_get_parent: Get the parent for a unionfs dentry
+- Obtain the parent from odf.
+- Also, find all the disconnected ancestors of the dentry, and connect them
+ all.
+
* CREDITS
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs