]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: add common checksum type validation
authorJohannes Thumshirn <jthumshirn@suse.de>
Mon, 3 Jun 2019 14:58:53 +0000 (16:58 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:35:01 +0000 (13:35 +0200)
commit785c7e1c6266107afcb7e3a62c3b70e2a877bc16
tree2f285c655eec50448a3ae213359bb36b706f6408
parentbf7e4ac0b0d0122856dbbc94aa63ec400c426221
btrfs: add common checksum type validation

Currently btrfs is only supporting CRC32C as checksumming algorithm. As
this is about to change provide a function to validate the checksum type
in the superblock against all possible algorithms.

This makes adding new algorithms easier as there are fewer places to
adjust when adding new algorithms.

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/disk-io.c