[Ocfs2-tools-commits] taoma commits r1351 - trunk/debugfs.ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon May 7 19:50:28 PDT 2007


Author: taoma
Date: 2007-05-07 19:50:25 -0700 (Mon, 07 May 2007)
New Revision: 1351

Modified:
   trunk/debugfs.ocfs2/find_block_inode.c
Log:
Add one check and one endian swap to find_block_inode.

Function find_block_inode forget to swap the information from disk to cpu.
This may cause problem in some big-endian machine.
Another check for fs generation is also added in the function.

Signed-off-by: smushran

Modified: trunk/debugfs.ocfs2/find_block_inode.c
===================================================================
--- trunk/debugfs.ocfs2/find_block_inode.c	2007-05-02 22:04:22 UTC (rev 1350)
+++ trunk/debugfs.ocfs2/find_block_inode.c	2007-05-08 02:50:25 UTC (rev 1351)
@@ -368,6 +368,11 @@
 			   strlen(OCFS2_INODE_SIGNATURE)))
 			continue;
 
+		ocfs2_swap_inode_to_cpu(di);
+
+		if (di->i_fs_generation != fs->fs_super->i_fs_generation)
+			continue;
+
 		if (!(di->i_flags & OCFS2_VALID_FL))
 			continue;
 




More information about the Ocfs2-tools-commits mailing list