]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
misc: add a crc32c self test to mkfs and repair
authorDarrick J. Wong <djwong@kernel.org>
Fri, 25 Feb 2022 22:37:56 +0000 (17:37 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 25 Feb 2022 22:37:56 +0000 (17:37 -0500)
commitca14a5706ffd2f3eb70002a2990e229103d881f6
treeb6616907c937e74f45eb0e4fcc42f165c238ff9d
parent9b72515a4f4800b2cdcbf3b27a63aa99654b1ea6
misc: add a crc32c self test to mkfs and repair

Enhance mkfs and xfs_repair to run the crc32c self test when they start
up, and refuse to continue if the self test fails.   We don't want to
format a filesystem if the checksum algorithm produces incorrect
results, and we especially don't want repair to tear a filesystem apart
because it thinks the checksum is wrong.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
io/crc32cselftest.c
libfrog/crc32.c
libfrog/crc32cselftest.h
man/man8/mkfs.xfs.8
man/man8/xfs_repair.8
mkfs/xfs_mkfs.c
repair/init.c