]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
metadump: check for non-zero inode alignment
authorBrian Foster <bfoster@redhat.com>
Tue, 24 Feb 2015 00:20:31 +0000 (11:20 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 24 Feb 2015 00:20:31 +0000 (11:20 +1100)
commit0ab7cbc83f59c8aea8cdc98454a978848af6a41a
tree7199b6bf8cacc815f4ed38cc194cb0d882f98c9c
parent39fe84affd9c3773235fc66f7050c43babc125b8
metadump: check for non-zero inode alignment

The copy_inode_chunk() function performs some basic sanity checks on the
inode record, block number, etc. One of these checks includes whether
the inode chunk is aligned according to sb_inoalignmt. sb_inoalignment
can equal 0 with larger block sizes. This results in a mod-by-zero,
"badly aligned inode ..." warnings and skipped inodes in metadump
images. This can be reproduced with a '-m crc=1,finobt=1 -b size=64k' fs
on ppc64.

Update copy_inode_chunk() to only enforce the inode alignment check when
sb_inoalignmt is non-zero.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/metadump.c