diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-10-15 18:42:20 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-11-18 17:51:46 +0100 |
commit | b8522a1e5f421e003a8d2a8937eb3a095ce33f5d (patch) | |
tree | 5c4ce9efdf2fb3a492e1b54152105d903359048e /tools/perf/scripts/python/mem-phys-addr.py | |
parent | bd2336b2ac119e65457261528883d9623d41315f (diff) |
btrfs: Factor out tree roots initialization during mount
The code responsible for reading and initializing tree roots is
scattered in open_ctree among 2 labels, emulating a loop. This is rather
confusing to reason about. Instead, factor the code to a new function,
init_tree_roots which implements the same logical flow.
There are a couple of notable differences, namely:
* Instead of using next_backup_root it's using the newly introduced
read_backup_root.
* If read_backup_root returns an error init_tree_roots propagates the
error and there is no special handling of that case e.g. the code jumps
straight to 'fail_tree_roots' label. The old code, however, was
(erroneously) jumping to 'fail_block_groups' label if next_backup_root
did fail, this was unnecessary since the tree roots init logic doesn't
modify the state of block groups.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/mem-phys-addr.py')
0 files changed, 0 insertions, 0 deletions