commit 8f5f43c48166da9e370a3472820702e57703f56a
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Mon Feb 5 18:08:37 2007 -0500

    Basic whiteout functionality, rmdir moves dir to reclaim if logically empty

diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index 8c3b46d..a246af0 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -245,9 +245,6 @@ out_positive:
        dput(first_hidden_dentry);
        unionfs_mntput(first_dentry, first_dentry_offset);
 
-       /* check odf */
-       UNIONFS_D(dentry)->odf_info = odf_lookup(parent_dentry, dentry, 0);
-
        /* Partial lookups need to reinterpose, or throw away older negs. */
        if (lookupmode == INTERPOSE_PARTIAL) {
                err = odf_lookup(parent_dentry, dentry, 0);
diff --git a/fs/unionfs/odf.c b/fs/unionfs/odf.c
index 3fde941..1926eed 100644
--- a/fs/unionfs/odf.c
+++ b/fs/unionfs/odf.c
@@ -1427,7 +1427,9 @@ int odf_is_opaque_i(struct inode *i)
 {
        if (!S_ISDIR(i->i_mode))
                return 0;
-       return EXT2_I(i)->i_flags & ODF_OPAQUE;
+       if (EXT2_I(i)->i_flags & ODF_OPAQUE)
+               return 1;
+       return 0;
 }
 /*
  * Gets opaque branch of a dentry, -1 if not opaque
@@ -1456,7 +1458,10 @@ int odf_get_opaque_i(struct inode *i)
  */
 int odf_set_opaque(struct dentry *dentry, int branch)
 {
-       return odf_set_opaque_i(UNIONFS_D(dentry)->odf_info->dentry->d_inode, 
branch);
+       int err = 
odf_set_opaque_i(UNIONFS_D(dentry)->odf_info->dentry->d_inode, branch);
+       if (!err)
+               UNIONFS_D(dentry)->odf_info->opaque = branch;
+       return err;
 }
 int odf_set_opaque_i(struct inode *i, int branch) 
 {
diff --git a/fs/unionfs/odf.h b/fs/unionfs/odf.h
index cb63f8d..a04284e 100644
--- a/fs/unionfs/odf.h
+++ b/fs/unionfs/odf.h
@@ -20,6 +20,7 @@
 /* Some string constants */
 #define ODF_BRANCH_PATH 255
 #define ODF_OPTIONS_LEN 255
+#define ODF_INAME_LEN  10
 
 /* Lookup flags (what to create if lookup fails) */
 #define ODF_LOOKUP_FILE        1 
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to