]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: add CRC32c infrastructure
authorDave Chinner <dchinner@redhat.com>
Thu, 9 May 2013 13:18:51 +0000 (08:18 -0500)
committerRich Johnston <rjohnston@sgi.com>
Thu, 9 May 2013 13:18:51 +0000 (08:18 -0500)
commit7e280e68cab97e321e306c6d1b2e684095f47296
tree7d5160042701ede36193023de7fd3ac8391a9044
parent49f693fa26783bb95136cdb3479902324be3f587
xfsprogs: add CRC32c infrastructure

Pull the generic crc32(c) code from the kernel and add it to libxfs.
Modify it to build in the libxfs environment, and drop the bigendian
CRC version as it is unused by XFS, which uses the little endian
version so that it can be hardware accelerated using native
instructions on x86-64 CPUs.

Also wire up the self-test code in the crc32 module to the build
infrastructure and make passing the self test a build dependency.
This prevents xfsprogs from being built on platforms that the CRC
algorithm does not work on and hence ensures the tools do not write
bad CRCs to disk as a result of a broken calculation.

Also pull the XFS CRC helper functions across in preparation for
using the CRC functions in libxfs.

XXX: something in the CRC table generation breaks the debian package
build. It fails to build libxfs as a dependency of mkfs.xfs. Works
fine outside the debian build environment, so I'm not sure what the
issue is yet. Most likely it is the execution path of the
gen_crc32table binary that is built...

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
include/Makefile
include/libxfs.h
include/xfs_arch.h
include/xfs_cksum.h [new file with mode: 0644]
libxfs/Makefile
libxfs/crc32.c [new file with mode: 0644]
libxfs/crc32defs.h [new file with mode: 0644]
libxfs/gen_crc32table.c [new file with mode: 0644]
libxfs/xfs_alloc_btree.c