]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
repair: process sparse inode records correctly
authorBrian Foster <bfoster@redhat.com>
Thu, 30 Jul 2015 23:18:22 +0000 (09:18 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 30 Jul 2015 23:18:22 +0000 (09:18 +1000)
commit3e62b2c09da8319757167df83952b748dad266c8
tree8edb6d03a23bd023733786c637f15708de17835a
parent4a7d3215d2b51f1e1ed24f841b5192f5ebf7b9a8
repair: process sparse inode records correctly

The inode processing phases of xfs_repair (3 and 4) validate the actual
inodes referred to by the previously scanned inode btrees. The physical
inodes are read from disk and internally validated in various ways. The
inode block state is also verified and corrected if necessary.

Sparse inodes are not physically allocated and the associated blocks may
be allocated to any other area of the fs (file data, internal use,
etc.). Attempts to validate these blocks as inode blocks produce noisy
corruption errors.

Update the inode processing mechanism to handle sparse inode records
correctly. Since sparse inodes do not exist, the general approach here
is to simply skip validation of sparse inodes. Update
process_inode_chunk() to skip reads of sparse clusters and set the buf
pointer of associated clusters to NULL. Update the rest of the function
to only verify non-NULL cluster buffers. Also, skip the inode block
state checks for blocks in sparse inode clusters.

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