summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file-item.h
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2023-03-20 10:12:51 +0800
committerDavid Sterba <dsterba@suse.com>2023-04-17 18:01:23 +0200
commitb979547513ff060ebe4a381b69d8478b18e1cc4e (patch)
treeaa7d72e8d007bc4c66bc9f0481bcd0f208a59aaa /fs/btrfs/file-item.h
parent2af2aaf982054cd2377bb0046b624df0f0d44d85 (diff)
downloadlinux-stable-b979547513ff060ebe4a381b69d8478b18e1cc4e.tar.gz
linux-stable-b979547513ff060ebe4a381b69d8478b18e1cc4e.tar.bz2
linux-stable-b979547513ff060ebe4a381b69d8478b18e1cc4e.zip
btrfs: scrub: introduce helper to find and fill sector info for a scrub_stripe
The new helper will search the extent tree to find the first extent of a logical range, then fill the sectors array by two loops: - Loop 1 to fill common bits and metadata generation - Loop 2 to fill csum data (only for data bgs) This loop will use the new btrfs_lookup_csums_bitmap() to fill the full csum buffer, and set scrub_sector_verification::csum. With all the needed info filled by this function, later we only need to submit and verify the stripe. Here we temporarily export the helper to avoid warning on unused static function. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/file-item.h')
-rw-r--r--fs/btrfs/file-item.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/file-item.h b/fs/btrfs/file-item.h
index cd7f2ae515c0..6be8725cd574 100644
--- a/fs/btrfs/file-item.h
+++ b/fs/btrfs/file-item.h
@@ -57,7 +57,8 @@ int btrfs_lookup_csums_list(struct btrfs_root *root, u64 start, u64 end,
struct list_head *list, int search_commit,
bool nowait);
int btrfs_lookup_csums_bitmap(struct btrfs_root *root, u64 start, u64 end,
- u8 *csum_buf, unsigned long *csum_bitmap);
+ u8 *csum_buf, unsigned long *csum_bitmap,
+ bool search_commit);
void btrfs_extent_item_to_extent_map(struct btrfs_inode *inode,
const struct btrfs_path *path,
struct btrfs_file_extent_item *fi,