[Ocfs2-tools-devel] debugfs.ocfs2 dump_inode() broken for s390x

Sunil Mushran sunil.mushran at oracle.com
Tue Jul 5 15:13:11 PDT 2011


On 07/05/2011 02:52 PM, Goldwyn Rodrigues wrote:
> Hi,
>
> This is the same problem when the user experiences **FAILED CHECKSUM**
> while using debugfs.ocfs2. The problem is not limited to super_block but
> is encountered with any inode.
>
> The problem is in do_stat or do_stats. The inode is read and then the
> data's CRC is checked. However, ocfs2_block_check_validate() requires
> the data to be in little-endian format. In case of s390x, because of the
> previous inode reads, the data is already in CPU or big-endian format,
> and hence results in incorrect CRC computation.
>
> Please fix, or advise a good method to fix.
>

whoops...

So there is a function detect_block() in journal.c. Move that to utils.c.

Then modify dump_block_check() to detect the block, call appropriate
_swap_from_cpu(), compute_metaecc, _swap_to_cpu().

e.g., ocfs2_swap_inode_from_cpu().





More information about the Ocfs2-tools-devel mailing list