]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: reloc: add backref_cache::pending_edge and backref_cache::useless_node
authorQu Wenruo <wqu@suse.com>
Thu, 5 Mar 2020 05:48:31 +0000 (13:48 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 May 2020 09:25:17 +0000 (11:25 +0200)
commita45b501f62ad73053e7af9f7b538569b4eff50b2
tree967607b3f529b05c13de125163cc028a7f4a9c02
parentc738659d335e84ef78a94bf62cb10b05e6418499
btrfs: reloc: add backref_cache::pending_edge and backref_cache::useless_node

These two new members will act the same as the existing local lists,
@useless and @list in build_backref_tree().

Currently build_backref_tree() is only executed serially, thus moving
such local list into backref_cache is still safe.

Also since we're here, use list_first_entry() to replace a lot of
list_entry() calls after !list_empty().

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
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/relocation.c