Commit 265d4ac
btrfs: sink parameter start and len to check_data_csum
For check_data_csum(), the page we're using is directly from the inode
mapping, thus it has valid page_offset().
We can use (page_offset() + pg_off) to replace @start parameter
completely, while the @len should always be sectorsize.
Since we're here, also add some comment, as there are quite some
confusion in words like start/offset, without explaining whether it's
file_offset or logical bytenr.
This should not affect the existing behavior, as for current sectorsize
== PAGE_SIZE case, @pgoff should always be 0, and len is always
PAGE_SIZE (or sectorsize from the dio read path).
Reviewed-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 8896a08 commit 265d4ac
1 file changed
+18
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2889 | 2889 | | |
2890 | 2890 | | |
2891 | 2891 | | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
2892 | 2902 | | |
2893 | | - | |
2894 | | - | |
| 2903 | + | |
2895 | 2904 | | |
2896 | 2905 | | |
2897 | 2906 | | |
2898 | 2907 | | |
| 2908 | + | |
2899 | 2909 | | |
2900 | 2910 | | |
2901 | 2911 | | |
2902 | 2912 | | |
| 2913 | + | |
| 2914 | + | |
2903 | 2915 | | |
2904 | 2916 | | |
2905 | 2917 | | |
| |||
2913 | 2925 | | |
2914 | 2926 | | |
2915 | 2927 | | |
2916 | | - | |
2917 | | - | |
| 2928 | + | |
| 2929 | + | |
2918 | 2930 | | |
2919 | 2931 | | |
2920 | 2932 | | |
| |||
2955 | 2967 | | |
2956 | 2968 | | |
2957 | 2969 | | |
2958 | | - | |
2959 | | - | |
| 2970 | + | |
2960 | 2971 | | |
2961 | 2972 | | |
2962 | 2973 | | |
| |||
7674 | 7685 | | |
7675 | 7686 | | |
7676 | 7687 | | |
7677 | | - | |
7678 | | - | |
| 7688 | + | |
7679 | 7689 | | |
7680 | 7690 | | |
7681 | 7691 | | |
| |||
0 commit comments