]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: defrag: introduce helper to collect target file extents
authorQu Wenruo <wqu@suse.com>
Fri, 6 Aug 2021 08:12:36 +0000 (16:12 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Oct 2021 17:06:53 +0000 (19:06 +0200)
commit274f05225e34502a45cbe7cff332b05d6091b4b7
treedb27e493e8b0ed10eeb8b20a7d38e41734e9948f
parent706fe67b63c73c2dda8996ba62382e2a7f39b510
btrfs: defrag: introduce helper to collect target file extents

Introduce a helper, defrag_collect_targets(), to collect all possible
targets to be defragged.

This function will not consider things like max_sectors_to_defrag, thus
caller should be responsible to ensure we don't exceed the limit.

This function will be the first stage of later defrag rework.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c