btrfs: add a is_data_bbio helper
authorChristoph Hellwig <hch@lst.de>
Wed, 31 May 2023 07:54:00 +0000 (09:54 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:36 +0000 (13:59 +0200)
commitfbe960877b6f434525cc38e44334157223058e09
tree24252717807ff82c2f5e4ce02157487f6f80c1ff
parentebfe4d4eb6ef6bd0f80293936808b77c1fc931b4
btrfs: add a is_data_bbio helper

Add a helper to check for that a btrfs_bio has a valid inode, and that
it is a data inode to key off all the special handling for data path
checksumming.  Note that this uses is_data_inode instead of REQ_META as
REQ_META is only set directly before submission in submit_one_bio and
we'll also want to use this helper for error handling where REQ_META
isn't set yet.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.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/bio.c