]> 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>
Thu, 6 Jan 2022 22:13:17 +0000 (14:13 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 Jan 2022 00:02:51 +0000 (16:02 -0800)
commit1d557d0ee0daa949278eded192063c84c84bddfd
tree0e167451bd7510aef9d4dc5a01e6a22fcdab6795
parentcdbf38490f9d0967501af70e8f6167311a1acfc4
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>
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