added comments for odf special filenames constants and grouped them together
authorYiannis Pericleous <yiannos@loki.fsl.cs.sunysb.edu>
Fri, 25 May 2007 03:24:55 +0000 (23:24 -0400)
committerRachita Kothiyal <rachita@dewey.fsl.cs.sunysb.edu>
Thu, 1 May 2008 23:02:32 +0000 (19:02 -0400)
fs/unionfs/odf.c
fs/unionfs/odf.h

index 70bd9c3e820b1ad4c0047283b39f5171bad88e59..d49247fe951795dbaecd9aadaab4bdcb5eeade93 100644 (file)
@@ -61,7 +61,7 @@ int __odf_create_hierarchy(struct dentry *odf_root)
                goto out;
        }
        dput(dentry);
-       dentry = lookup_one_len(ODF_WH_NAME, odf_root, ODF_WH_LEN);
+       dentry = lookup_one_len(ODF_WH, odf_root, sizeof(ODF_WH) - 1);
        if (IS_ERR(dentry)) {
                err = PTR_ERR(dentry);
                dentry = NULL;
@@ -164,7 +164,7 @@ struct odf_sb_info* odf_read_super(char *options)
                goto out_free;
        }
 
-       osi->whiteout = lookup_one_len(ODF_WH_NAME, nd.dentry, ODF_WH_LEN);
+       osi->whiteout = lookup_one_len(ODF_WH, nd.dentry, sizeof(ODF_WH) - 1);
        if (IS_ERR(osi->whiteout)) {
                err = PTR_ERR(osi->whiteout);
                osi->whiteout = NULL;
index 6c20820873b6c91048e6cdbcbadc35d23b3ed10e..c1287567cd1092cf280376d488783d308701b956 100644 (file)
@@ -4,11 +4,15 @@
 #define UUID_LEN 16
 #define ODF_VERSION 2
 
-#define ODF_SB "sb"
-#define ODF_IC "ic"
-#define ODF_RC "reclaim"
-#define ODF_NS "ns"
-#define ODF_SR "sr"
+/* odf special filenames/dirnames */
+#define ODF_SB "sb"            /* odf superblock file (/odf/sb) */
+#define ODF_IC "ic"            /* inode cache dir (/odf/ic) */
+#define ODF_RC "reclaim"       /* reclaim dir (/odf/reclaim) */
+#define ODF_NS "ns"            /* namespace dir (/odf/ns) */
+#define ODF_SR "sr"            /* sily rename dir (/odf/sr) */
+#define ODF_WH "whiteout"      /* the file whiteouts are linked to */
+#define ODF_CONTENT "content"  /* name of cached dirs file in /odf/ic */
+#define ODF_CONTENT_LEN (sizeof(ODF_CONTENT) - 1)
 
 /* Some string constants */
 #define ODF_BRANCH_PATH 255
 
 #define ODF_DIRENT_MAGIC 0x0DFD1300
 
-/* special filenames */
-#define ODF_CONTENT "content"
-#define ODF_CONTENT_LEN 7
-#define ODF_WH_NAME "whiteout"
-#define ODF_WH_LEN 8
-
 #define ODF_CLEAN_ALL 1
 #define ODF_CLEAN_CACHE 2
 #define ODF_CLEAN_INODES 3