diff options
| author | Qu Wenruo <wqu@suse.com> | 2022-05-22 13:47:48 +0200 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2022-07-25 17:44:33 +0200 |
| commit | ae643a74ebdb150b004601d0d5fe5a1faba9b04d (patch) | |
| tree | ba06fd8d41ddbaee9ba824da4efe5b85e9a6cb87 /tools/perf/scripts | |
| parent | b036f47996c5c9b4926d47f31bcd156e16c53617 (diff) | |
| download | linux-ae643a74ebdb150b004601d0d5fe5a1faba9b04d.tar.gz linux-ae643a74ebdb150b004601d0d5fe5a1faba9b04d.zip | |
btrfs: introduce a data checksum checking helper
Although we have several data csum verification code, we never have a
function really just to verify checksum for one sector.
Function check_data_csum() do extra work for error reporting, thus it
requires a lot of extra things like file offset, bio_offset etc.
Function btrfs_verify_data_csum() is even worse, it will utilize page
checked flag, which means it can not be utilized for direct IO pages.
Here we introduce a new helper, btrfs_check_sector_csum(), which really
only accept a sector in page, and expected checksum pointer.
We use this function to implement check_data_csum(), and export it for
incoming patch.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
[hch: keep passing the csum array as an arguments, as the callers want
to print it, rename per request]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions
