diff options
| author | Qu Wenruo <[email protected]> | 2018-11-02 09:39:50 +0800 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2018-12-17 14:51:26 +0100 |
| commit | e72d79d6bcee564dbdf83169c743bbd3f8438108 (patch) | |
| tree | 7bfe529dfee696265e9fab344bb2d61a8b12fc09 /tools/perf/scripts/python/stackcollapse.py | |
| parent | e1a4184815672c0cd8ea91beca3dd6d0bd4b9e53 (diff) | |
btrfs: Refactor find_free_extent loops update into find_free_extent_update_loop
We have a complex loop design for find_free_extent(), that has different
behavior for each loop, some even includes new chunk allocation.
Instead of putting such a long code into find_free_extent() and makes it
harder to read, just extract them into find_free_extent_update_loop().
With all the cleanups, the main find_free_extent() should be pretty
barebone:
find_free_extent()
|- Iterate through all block groups
| |- Get a valid block group
| |- Try to do clustered allocation in that block group
| |- Try to do unclustered allocation in that block group
| |- Check if the result is valid
| | |- If valid, then exit
| |- Jump to next block group
|
|- Push harder to find free extents
|- If not found, re-iterate all block groups
Signed-off-by: Qu Wenruo <[email protected]>
Reviewed-by: Su Yue <[email protected]>
[ copy callchain from changelog to function comment ]
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions