diff options
| author | Qu Wenruo <wqu@suse.com> | 2021-08-06 16:12:35 +0800 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2021-10-26 19:06:34 +0200 |
| commit | 5767b50c00969cd2b228eca8cd43313e14f10643 (patch) | |
| tree | 7bb4abd5b811452570c4b8ddfb83f45f68299553 /lib/debugobjects.c | |
| parent | 76068cae634bf1bb3e06f79d7b879834277554ca (diff) | |
btrfs: defrag: factor out page preparation into a helper
In cluster_pages_for_defrag(), we have complex code block inside one
for() loop.
The code block is to prepare one page for defrag, this will ensure:
- The page is locked and set up properly.
- No ordered extent exists in the page range.
- The page is uptodate.
This behavior is pretty common and will be reused by later defrag
rework.
So factor out the code into its own helper, defrag_prepare_one_page(),
for later usage, and cleanup the code by a little.
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
