summaryrefslogtreecommitdiff
path: root/lib/debugobjects.c
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-08-06 16:12:38 +0800
committerDavid Sterba <dsterba@suse.com>2021-10-26 19:07:57 +0200
commite9eec72151e215c9bc58431c1a7e00e759c6c391 (patch)
tree43b01bc01bf198945c3ba8e7ab956e163a8c91e1 /lib/debugobjects.c
parent22b398eeeed43d51e85b1008e51bf9663ac1f491 (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