mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-11-27 06:04:30 +08:00
btrfs-progs: move crc32c implementation to crypto/
With the introduction of xxhash64 to btrfs-progs we created a crypto/ directory for all the hashes used in btrfs (although no cryptographically secure hash is there yet). Move the crc32c implementation from kernel-lib/ to crypto/ as well so we have all hashes consolidated. Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
f070ece2e9
commit
c04bcdcacc
@ -32,10 +32,10 @@ cmds_objects := cmds-subvolume.c cmds-filesystem.c cmds-device.c cmds-scrub.c \
|
||||
cmds-inspect-dump-super.c cmds-inspect-tree-stats.c cmds-fi-du.c \
|
||||
mkfs/common.c
|
||||
libbtrfs_objects := send-stream.c send-utils.c kernel-lib/rbtree.c btrfs-list.c \
|
||||
kernel-lib/crc32c.c messages.c \
|
||||
crypto/crc32c.c messages.c \
|
||||
uuid-tree.c utils-lib.c rbtree-utils.c
|
||||
libbtrfs_headers := send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-list.h \
|
||||
kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
|
||||
crypto/crc32c.h kernel-lib/list.h kerncompat.h \
|
||||
kernel-lib/radix-tree.h kernel-lib/sizes.h kernel-lib/raid56.h \
|
||||
extent-cache.h extent_io.h ioctl.h ctree.h btrfsck.h version.h
|
||||
blkid_objects := partition/ superblocks/ topology/
|
||||
|
4
Makefile
4
Makefile
@ -149,7 +149,7 @@ cmds_objects = cmds/subvolume.o cmds/filesystem.o cmds/device.o cmds/scrub.o \
|
||||
mkfs/common.o check/mode-common.o check/mode-lowmem.o
|
||||
libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
|
||||
kernel-lib/radix-tree.o extent-cache.o extent_io.o \
|
||||
kernel-lib/crc32c.o common/messages.o \
|
||||
crypto/crc32c.o common/messages.o \
|
||||
uuid-tree.o utils-lib.o common/rbtree-utils.o \
|
||||
ctree.o disk-io.o extent-tree.o delayed-ref.o print-tree.o \
|
||||
free-space-cache.o root-tree.o volumes.o transaction.o \
|
||||
@ -159,7 +159,7 @@ libbtrfs_objects = send-stream.o send-utils.o kernel-lib/rbtree.o btrfs-list.o \
|
||||
common/utils.o libbtrfsutil/subvolume.o libbtrfsutil/stubs.o \
|
||||
crypto/hash.o crypto/xxhash.o
|
||||
libbtrfs_headers = send-stream.h send-utils.h send.h kernel-lib/rbtree.h btrfs-list.h \
|
||||
kernel-lib/crc32c.h kernel-lib/list.h kerncompat.h \
|
||||
crypto/crc32c.h kernel-lib/list.h kerncompat.h \
|
||||
kernel-lib/radix-tree.h kernel-lib/sizes.h kernel-lib/raid56.h \
|
||||
extent-cache.h extent_io.h ioctl.h ctree.h btrfsck.h version.h
|
||||
libbtrfsutil_major := $(shell sed -rn 's/^\#define BTRFS_UTIL_VERSION_MAJOR ([0-9])+$$/\1/p' libbtrfsutil/btrfsutil.h)
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
void print_usage(int status)
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "kernel-lib/list.h"
|
||||
#include "volumes.h"
|
||||
#include "common/utils.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "extent-cache.h"
|
||||
#include "find-root.h"
|
||||
#include "common/help.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <byteswap.h>
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "disk-io.h"
|
||||
|
||||
#define BLOCKSIZE (4096)
|
||||
|
2
btrfs.c
2
btrfs.c
@ -20,7 +20,7 @@
|
||||
#include <getopt.h>
|
||||
|
||||
#include "volumes.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/help.h"
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "kernel-lib/list.h"
|
||||
#include "common/utils.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/help.h"
|
||||
|
||||
static int check_csum_sblock(void *sb, int csum_size, u16 csum_type)
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "transaction.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/utils.h"
|
||||
#include "check/common.h"
|
||||
#include "cmds/commands.h"
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "kernel-lib/list.h"
|
||||
#include "common/utils.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "volumes.h"
|
||||
#include "cmds/commands.h"
|
||||
#include "cmds/rescue.h"
|
||||
|
@ -47,7 +47,7 @@
|
||||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/path-utils.h"
|
||||
#include "common/device-scan.h"
|
||||
|
@ -102,7 +102,7 @@
|
||||
#include "mkfs/common.h"
|
||||
#include "convert/common.h"
|
||||
#include "convert/source-fs.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/fsfeatures.h"
|
||||
#include "common/box.h"
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*/
|
||||
#include "kerncompat.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
@ -29,7 +29,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "volumes.h"
|
||||
#include "transaction.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/utils.h"
|
||||
#include "print-tree.h"
|
||||
#include "common/rbtree-utils.h"
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "print-tree.h"
|
||||
#include "transaction.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "volumes.h"
|
||||
#include "free-space-cache.h"
|
||||
#include "free-space-tree.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
#include "print-tree.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/internal.h"
|
||||
|
||||
#define MAX_CSUM_ITEMS(r, size) ((((BTRFS_LEAF_DATA_SIZE(r->fs_info) - \
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "transaction.h"
|
||||
#include "disk-io.h"
|
||||
#include "extent_io.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "kernel-lib/bitops.h"
|
||||
#include "common/internal.h"
|
||||
#include "common/utils.h"
|
||||
|
2
hash.h
2
hash.h
@ -19,7 +19,7 @@
|
||||
#ifndef __BTRFS_HASH_H__
|
||||
#define __BTRFS_HASH_H__
|
||||
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
|
||||
static inline u64 btrfs_name_hash(const char *name, int len)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include <getopt.h>
|
||||
|
||||
#include "kerncompat.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "ctree.h"
|
||||
#include "disk-io.h"
|
||||
#include "transaction.h"
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "common/internal.h"
|
||||
#include "common/messages.h"
|
||||
#include "common/utils.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "image/sanitize.h"
|
||||
#include "extent_io.h"
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "version.h"
|
||||
#include "kernel-lib/rbtree.h"
|
||||
#include "kernel-lib/radix-tree.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "kernel-lib/list.h"
|
||||
#include "kernel-lib/sizes.h"
|
||||
#include "ctree.h"
|
||||
|
@ -45,7 +45,7 @@
|
||||
#include "common/rbtree-utils.h"
|
||||
#include "mkfs/common.h"
|
||||
#include "mkfs/rootdir.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/fsfeatures.h"
|
||||
#include "common/box.h"
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include "send.h"
|
||||
#include "send-stream.h"
|
||||
#include "kernel-lib/crc32c.h"
|
||||
#include "crypto/crc32c.h"
|
||||
#include "common/utils.h"
|
||||
|
||||
struct btrfs_send_stream {
|
||||
|
Loading…
Reference in New Issue
Block a user