diff options
author | Qu Wenruo <wqu@suse.com> | 2025-06-16 08:14:25 +0930 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2025-07-22 00:06:19 +0200 |
commit | 2936a6ac8d976f3c4de6fb5fbc00c5905c0cfec7 (patch) | |
tree | 6587b46893ff379e3f48fb4bf8f8bb7037791240 /tools/perf/scripts/python/parallel-perf.py | |
parent | 35ea448b75f3bdb825e6a19fd8db2a147bee0ab7 (diff) |
btrfs: add assertions to make super block creation more clear
When calling sget_fc(), there are 3 different situations:
a) Critical error
No super block created.
b) A new super block is created
The fc->s_fs_info is transferred to the super block, and fc->s_fs_info
is reset to NULL.
In this case sb->s_root should still be NULL, and needs to be properly
initialized later by btrfs_fill_super().
c) An existing super block is returned
The fc->s_fs_info is untouched, and anything related to that fs_info
should be properly cleaned up.
This is not obvious even with the extra comments at sget_fc().
Enhance the situation by:
- Add comments for case b) and c)
Especially for case c), the fs_info and fs_devices cleanup happens at
different timing, thus needs extra explanation.
- Move the comments closer to case b) and case c)
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 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions