btrfs: add a btrfs_data_csum_ok helper
authorChristoph Hellwig <hch@lst.de>
Sat, 21 Jan 2023 06:50:06 +0000 (07:50 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Feb 2023 18:38:51 +0000 (19:38 +0100)
commite52190441bd6b268aed6ecc0efe3614c4222014e
tree3549ee59ad9184ba75b9c456394e88feda7183af
parent1c2b3ee3b0ec4bc971e23fe18d4c92333a6ad18a
btrfs: add a btrfs_data_csum_ok helper

Add a new checksumming helper that wraps btrfs_check_data_csum and
does all the checks to if we're dealing with some form of nodatacsum
I/O.  This helper will be used by the new storage layer checksum
validation and repair code.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c