diff options
| author | Qu Wenruo <wqu@suse.com> | 2021-08-06 16:12:38 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:07:57 +0200 |
| commit | e9eec72151e215c9bc58431c1a7e00e759c6c391 (patch) | |
| tree | 43b01bc01bf198945c3ba8e7ab956e163a8c91e1 /lib/debugobjects.c | |
| parent | 22b398eeeed43d51e85b1008e51bf9663ac1f491 (diff) | |
btrfs: defrag: introduce helper to defrag a range
A new helper, defrag_one_range(), is introduced to defrag one range.
This function will mostly prepare the needed pages and extent status for
defrag_one_locked_target().
As we can only have a consistent view of extent map with page and extent
bits locked, we need to re-check the range passed in to get a real
target list for defrag_one_locked_target().
Since defrag_collect_targets() will call defrag_lookup_extent() and lock
extent range, we also need to teach those two functions to skip extent
lock. Thus new parameter, @locked, is introduced to skip extent lock if
the caller has already locked the range.
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 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions
