btrfs: Introduce find_free_extent_ctl structure for later rework
authorQu Wenruo <wqu@suse.com>
Fri, 2 Nov 2018 01:39:47 +0000 (09:39 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:26 +0000 (14:51 +0100)
commitb4bd745d1230ddcf8de408997db9a45cd696508d
tree85f61b73ab803664de68eeaaf69d5b1ed79e3c45
parente2907c1a6ae1842f9c1d5393bbe966c1ccfbc335
btrfs: Introduce find_free_extent_ctl structure for later rework

Instead of tons of different local variables in find_free_extent(),
extract them into find_free_extent_ctl structure, and add better
explanation for them.

Some modification may looks redundant, but will later greatly simplify
function parameter list during find_free_extent() refactor.

Also add two comments to co-operate with fb5c39d7a887 ("btrfs: don't use
ctl->free_space for max_extent_size"), to make ffe_ctl->max_extent_size
update more reader-friendly.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Su Yue <suy.fnst@cn.fujitsu.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c