]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
metadump: support sparse inode records
authorBrian Foster <bfoster@redhat.com>
Tue, 23 Jun 2015 05:08:48 +0000 (15:08 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 23 Jun 2015 05:08:48 +0000 (15:08 +1000)
commit1e2689af2a2c694749419d28c0b546a1cd9fc85c
tree82fe8075e008a2d0efbd260e6fbe800fac0a5fe1
parent3fe33d921220b7e9ee5801f63c38c83714d8e914
metadump: support sparse inode records

xfs_metadump currently uses mp->m_ialloc_blks sized buffers to copy
inode chunks. If a filesystem supports sparse inodes, some clusters
within inode chunks can point to arbitrary data. If the buffer used to
read inodes includes these sparse clusters, inode read verification
fails and prints filesystem corruption warnings.

Update copy_inode_chunks() to support using a cluster sized buffer to
read a full inode chunk in multiple iterations if sparse inodes is
enabled. For each cluster read, check whether the first inode in the
cluster is sparse and skip the cluster if so. This is safe because
sparse records are allocated at cluster granularity.

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