diff options
| author | Qu Wenruo <wqu@suse.com> | 2021-01-06 04:01:41 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2021-02-09 00:58:52 +0300 |
| commit | 6bc5636a67bf489d95ebc06c0449396fd487d309 (patch) | |
| tree | c09d3bd3298cd420ccfdedbe993275bd7dd3b7c9 /tools/perf/scripts/python/syscall-counts.py | |
| parent | 0c64c33c603f692ceb91d9fe17cc10028cff7da8 (diff) | |
| download | linux-6bc5636a67bf489d95ebc06c0449396fd487d309.tar.xz | |
btrfs: refactor __extent_writepage_io() to improve readability
The refactoring involves the following modifications:
- iosize alignment
In fact we don't really need to manually do alignment at all.
All extent maps should already be aligned, thus basic ASSERT() check
would be enough.
- redundant variables
We have extra variable like blocksize/pg_offset/end.
They are all unnecessary.
@blocksize can be replaced by sectorsize size directly, and it's only
used to verify the em start/size is aligned.
@pg_offset can be easily calculated using @cur and page_offset(page).
@end is just assigned from @page_end and never modified, use
"start + PAGE_SIZE - 1" directly and remove @page_end.
- remove some BUG_ON()s
The BUG_ON()s are for extent map, which we have tree-checker to check
on-disk extent data item and runtime check.
ASSERT() should be enough.
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
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 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
