aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2020-12-02 14:47:59 +0800
committerDavid Sterba <[email protected]>2020-12-09 19:16:09 +0100
commitf44cf41075b05660d61efa7bfa8350b45286f065 (patch)
tree219838815a6ce07590b6d239cf5ff540e737a51d /tools/perf/util/trace-event-scripting.c
parent7ffd27e378d2541059b9ba49868c32d90ad5ae91 (diff)
btrfs: make btrfs_verify_data_csum follow sector size
Currently btrfs_verify_data_csum() just passes the whole page to check_data_csum(), which is fine since we only support sectorsize == PAGE_SIZE. To support subpage, we need to properly honor per-sector checksum verification, just like what we did in dio read path. This patch will do the csum verification in a for loop, starts with pg_off == start - page_offset(page), with sectorsize increase for each loop. For sectorsize == PAGE_SIZE case, the pg_off will always be 0, and we will only loop once. For subpage case, we do the iterate over each sector and if we found any error, we return error. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Goldwyn Rodrigues <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions