summaryrefslogtreecommitdiff
path: root/fs/btrfs/disk-io.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2020-06-24 18:02:53 +0200
committerTom Rini <trini@konsulko.com>2020-09-07 20:57:27 -0400
commitbe3594254605047d0623f905329d160544ca925c (patch)
treea5f3ddd61bbb247025d666af0f98f2afe20815d3 /fs/btrfs/disk-io.h
parent9a9be5ec17d24779945a8b3e595c105d98596bdd (diff)
fs: btrfs: Crossport structure accessor into ctree.h
This brings all structure accessors from btrfs-progs/ctree.h, as in kernel's ctree.h. All these accessors handle the endian convert at runtime, and since all of them are defined as static inline functions, those which aren't used won't take space in resulting binary. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'fs/btrfs/disk-io.h')
-rw-r--r--fs/btrfs/disk-io.h9
1 files changed, 0 insertions, 9 deletions
diff --git a/fs/btrfs/disk-io.h b/fs/btrfs/disk-io.h
index fe4093cbd83..35b92939467 100644
--- a/fs/btrfs/disk-io.h
+++ b/fs/btrfs/disk-io.h
@@ -4,20 +4,11 @@
#include <linux/sizes.h>
#include <fs_internal.h>
-#include "crypto/hash.h"
#include "ctree.h"
#include "disk-io.h"
#define BTRFS_SUPER_INFO_OFFSET SZ_64K
#define BTRFS_SUPER_INFO_SIZE SZ_4K
-static inline u64 btrfs_name_hash(const char *name, int len)
-{
- u32 crc;
-
- crc = crc32c((u32)~1, (unsigned char *)name, len);
-
- return (u64)crc;
-}
int btrfs_csum_data(u16 csum_type, const u8 *data, u8 *out, size_t len);