]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: validate & fix inode CRCs
authorEric Sandeen <sandeen@sandeen.net>
Tue, 7 Apr 2015 00:04:11 +0000 (10:04 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 7 Apr 2015 00:04:11 +0000 (10:04 +1000)
commit7d7c5553e3fdf8d65537037603372869ca19d5eb
treec5872364bdb624a9f2e829de351d181aa145c5dd
parentb8ec08a1346d3a52a4ac4d4a414fc36aae272ee7
xfs_repair: validate & fix inode CRCs

xfs_repair doesn't ever check an inode's CRC, so it never repairs
them.  If the root inode or realtime inodes have bad crcs, the
fs won't even mount and can't be fixed (without using xfs_db).

It's fairly straightforward to just test the inode CRC before
we do any other checking or modification of the inode, and
just mark it dirty if it's wrong and needs to be re-written.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/dinode.c