aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-01-06 09:01:41 +0800
committerDavid Sterba <dsterba@suse.com>2021-02-08 22:58:52 +0100
commit6bc5636a67bf489d95ebc06c0449396fd487d309 (patch)
treec09d3bd3298cd420ccfdedbe993275bd7dd3b7c9 /tools/perf/scripts/python/export-to-sqlite.py
parentbtrfs: rename parameter offset to disk_bytenr in submit_extent_page (diff)
downloadlinux-6bc5636a67bf489d95ebc06c0449396fd487d309.tar.gz
linux-6bc5636a67bf489d95ebc06c0449396fd487d309.zip
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/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions