]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: create structure to encode checksum type and length
authorJohannes Thumshirn <jthumshirn@suse.de>
Fri, 30 Aug 2019 11:36:09 +0000 (13:36 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:19 +0000 (14:59 +0200)
commit8fe8098c0fa9dacab5b0535b956baa3260f98c52
treec7d8d0d5e4d23647c58efee6ee9db6057f127b5c
parente8ecc948625e7e8528bc4fb5bc5c5feb177b359b
btrfs: create structure to encode checksum type and length

Create a structure to encode the type and length for the known on-disk
checksums.  This makes it easier to add new checksums later.

The structure and helpers are moved from ctree.h so they don't occupy
space in all headers including ctree.h. This save some space in the
final object.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c
fs/btrfs/ctree.h