]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
metadump: be careful zeroing corrupt inode forks
authorDave Chinner <dchinner@redhat.com>
Fri, 27 May 2022 20:36:14 +0000 (16:36 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 27 May 2022 20:36:14 +0000 (16:36 -0400)
commit38feb6e5140031e24620f76d47cb78dcca29aa10
tree3b83307567d4c6c6f06f8384998232a4fed03a20
parenta196ca6527083d8ad00bf69878e445cc8f710191
metadump: be careful zeroing corrupt inode forks

When a corrupt inode fork is encountered, we can zero beyond the end
of the inode if the fork pointers are sufficiently trashed. We
should not trust the fork pointers when corruption is detected and
skip the zeroing in this case. We want metadump to capture the
corruption and so skipping the zeroing will give us the best chance
of preserving the corruption in a meaningful state for diagnosis.

Reported-by: Sean Caron <scaron@umich.edu>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
db/metadump.c