GIT: unionfs2-2.6.27.y: debugging: test for freed (0x5a) inodes

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:16:24 EDT 2010


commit 720ca0d1812a2da8c63937089b4f803ced949a85
Author: Erez Zadok <ezk at bigvaio.(none)>
Date:   Tue May 22 23:49:35 2007 -0400

    debugging: test for freed (0x5a) inodes
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
index ba33b48..821ef65 100644
--- a/fs/unionfs/debug.c
+++ b/fs/unionfs/debug.c
@@ -84,6 +84,10 @@ void __unionfs_check_inode(const struct inode *inode,
 	PRINT_CALLER;
 	printk(" Ci5: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
 	       inode, lower_inode, bindex, istart, iend);
+      } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed inode! */
+	PRINT_CALLER;
+	printk(" Ci6: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
+	       inode, lower_inode, bindex, istart, iend);
       }
     } else {	/* lower_inode == NULL */
       if (bindex >= istart && bindex <= iend) {
@@ -93,7 +97,7 @@ void __unionfs_check_inode(const struct inode *inode,
 	 */
 	if (!(S_ISDIR(inode->i_mode) && bindex > istart && bindex < iend)) {
 	  PRINT_CALLER;
-	  printk(" Ci6: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
+	  printk(" Ci7: inode/linode=%p:%p bindex=%d istart/end=%d:%d\n",
 		 inode, lower_inode, bindex, istart, iend);
 	}
       }
@@ -227,6 +231,10 @@ void __unionfs_check_dentry(const struct dentry *dentry,
 	PRINT_CALLER;
 	printk(" CI5: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
 	       dentry, lower_inode, bindex, istart, iend);
+      } else if ((int)lower_inode == 0x5a5a5a5a) { /* freed inode! */
+	PRINT_CALLER;
+	printk(" CI6: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
+	       dentry, lower_inode, bindex, istart, iend);
       }
     } else {	/* lower_inode == NULL */
       if (bindex >= istart && bindex <= iend) {
@@ -236,7 +244,7 @@ void __unionfs_check_dentry(const struct dentry *dentry,
 	 */
 	if (!(S_ISDIR(inode->i_mode) && bindex > istart && bindex < iend)) {
 	  PRINT_CALLER;
-	  printk(" CI6: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
+	  printk(" CI7: dentry/linode=%p:%p bindex=%d istart/end=%d:%d\n",
 		 dentry, lower_inode, bindex, istart, iend);
 	}
       }


More information about the unionfs-cvs mailing list