summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2023-04-29 22:07:20 +0200
committerDavid Sterba <dsterba@suse.com>2023-06-19 13:59:25 +0200
commitb3cbfb0dd4a80c359701280f6acfa37131d8ee8b (patch)
tree6754b594fb8cd77c818f57fb913beff8e97b71cd /fs/btrfs/ctree.h
parentbtrfs: add __KERNEL__ check for btrfs_no_printk (diff)
downloadlinux-b3cbfb0dd4a80c359701280f6acfa37131d8ee8b.tar.xz
linux-b3cbfb0dd4a80c359701280f6acfa37131d8ee8b.zip
btrfs: add a btrfs_csum_type_size helper
This is needed in btrfs-progs for the tools that convert the checksum types for file systems and a few other things. We don't have it in the kernel as we just want to get the size for the super blocks type. However I don't want to have to manually add this every time we sync ctree.c into btrfs-progs, so add the helper in the kernel with a note so it doesn't get removed by a later cleanup. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index b7ab7fa2b73a..717fca1797d6 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -701,6 +701,7 @@ static inline bool btrfs_is_data_reloc_root(const struct btrfs_root *root)
return root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID;
}
+u16 btrfs_csum_type_size(u16 type);
int btrfs_super_csum_size(const struct btrfs_super_block *s);
const char *btrfs_super_csum_name(u16 csum_type);
const char *btrfs_super_csum_driver(u16 csum_type);