summaryrefslogtreecommitdiff
path: root/fs/btrfs/raid56.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-11-14 08:26:33 +0800
committerDavid Sterba <dsterba@suse.com>2022-12-05 18:00:57 +0100
commitc5a415627be4758ebdd274de7148706d6713c7ec (patch)
tree48d39865c7a6b5113bea94ac963a834b82c6110f /fs/btrfs/raid56.h
parent97e3823933108cfc648bb08d5ad36251b6588164 (diff)
btrfs: raid56: prepare data checksums for later RMW verification
This is for later data checksum verification at RMW time. This patch will try to allocate the needed memory for a locked rbio if the rbio is for data exclusively (we don't want to handle mixed bg yet). The memory will be released when the rbio is finished. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/raid56.h')
-rw-r--r--fs/btrfs/raid56.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/btrfs/raid56.h b/fs/btrfs/raid56.h
index a2e653e93fd8..7c73a443939e 100644
--- a/fs/btrfs/raid56.h
+++ b/fs/btrfs/raid56.h
@@ -129,6 +129,18 @@ struct btrfs_raid_bio {
* Thus making it much harder to iterate.
*/
unsigned long *error_bitmap;
+
+ /*
+ * Checksum buffer if the rbio is for data. The buffer should cover
+ * all data sectors (exlcuding P/Q sectors).
+ */
+ u8 *csum_buf;
+
+ /*
+ * Each bit represents if the corresponding sector has data csum found.
+ * Should only cover data sectors (excluding P/Q sectors).
+ */
+ unsigned long *csum_bitmap;
};
/*