[Ocfs2-tools-devel] [PATCH] debugfs.ocfs2: fix the endian error in find_block_inode

Sunil Mushran sunil.mushran at oracle.com
Tue May 1 14:59:53 PDT 2007


Shouldn't this be fixed in ocfs2_get_next_inode()? As in, all this
endian swapping business needs to be done in the libocfs2 not the
individual tools.

Joel?

On Sat, 2007-04-28 at 14:22 +0800, tao.ma wrote:
> Function find_block_inode forget to swap the information from disk to 
> cpu. This may cause problem in some big-endian machine.
> 
> plain text document attachment (find_block_inode.patch)
> Index: debugfs.ocfs2/find_block_inode.c
> ===================================================================
> --- debugfs.ocfs2/find_block_inode.c	(revision 1346)
> +++ debugfs.ocfs2/find_block_inode.c	(working copy)
> @@ -368,6 +368,8 @@ errcode_t find_block_inode(ocfs2_filesys
>  			   strlen(OCFS2_INODE_SIGNATURE)))
>  			continue;
>  
> +		ocfs2_swap_inode_to_cpu(di);
> +
>  		if (!(di->i_flags & OCFS2_VALID_FL))
>  			continue;
>  
> _______________________________________________
> Ocfs2-tools-devel mailing list
> Ocfs2-tools-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-tools-devel




More information about the Ocfs2-tools-devel mailing list