diff options
| author | Qu Wenruo <[email protected]> | 2021-01-06 09:01:41 +0800 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2021-02-08 22:58:52 +0100 |
| commit | 6bc5636a67bf489d95ebc06c0449396fd487d309 (patch) | |
| tree | c09d3bd3298cd420ccfdedbe993275bd7dd3b7c9 /tools/perf/scripts/python/export-to-sqlite.py | |
| parent | 0c64c33c603f692ceb91d9fe17cc10028cff7da8 (diff) | |
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 <[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/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions