From: Nikolay Borisov <nborisov@suse.com>
To: Josef Bacik <josef@toxicpanda.com>,
linux-btrfs@vger.kernel.org, kernel-team@fb.com
Subject: Re: [PATCH 41/43] btrfs: make the init of static elements in fs_info separate
Date: Thu, 23 Jan 2020 14:30:24 +0200 [thread overview]
Message-ID: <987b7059-0bc8-b4ad-0898-5c50c6ac762b@suse.com> (raw)
In-Reply-To: <20200117212602.6737-42-josef@toxicpanda.com>
On 17.01.20 г. 23:26 ч., Josef Bacik wrote:
> In adding things like eb leak checking and root leak checking there were
> a lot of weird corner cases that come from the fact that
>
> 1) We do not init the fs_info until we get to open_ctree time in the
> normal case and
>
> 2) The test infrastructure half-init's the fs_info for things that it
> needs.
>
> This makes it really annoying to make changes because you have to add
> init in two different places, have special cases for testing fs_info's
> that may not have certain things init'ed, and cases for fs_info's that
> didn't make it to open_ctree and thus are not fully init'ed.
>
> Fix this by extracting out the non-allocating init of the fs info into
> it's own public function and use that to make sure we're all getting
> consistent views of an allocated fs_info.
>
Imo it will be better if btrfs_init_fs_info is called from
init_mount_fs_info. And then called explicitly from the test code. That
way we keep the initialization close. Otherwise having it in
btrfs_mount_root is just confusing and not very obvious what's going on.
next prev parent reply other threads:[~2020-01-23 12:30 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-17 21:25 [PATCH 00/43][v4] Cleanup how we handle root refs, part 1 Josef Bacik
2020-01-17 21:25 ` [PATCH 01/43] btrfs: push __setup_root into btrfs_alloc_root Josef Bacik
2020-01-20 14:23 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 02/43] btrfs: move fs root init stuff into btrfs_init_fs_root Josef Bacik
2020-01-20 14:29 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 03/43] btrfs: make btrfs_find_orphan_roots use btrfs_get_fs_root Josef Bacik
2020-01-20 17:36 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 04/43] btrfs: export and use btrfs_read_tree_root Josef Bacik
2020-01-22 9:15 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 05/43] btrfs: make relocation use btrfs_read_tree_root() Josef Bacik
2020-01-22 9:22 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 06/43] btrfs: kill btrfs_read_fs_root Josef Bacik
2020-01-22 9:25 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 07/43] btrfs: kill the btrfs_read_fs_root_no_name helper Josef Bacik
2020-01-22 9:26 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 08/43] btrfs: make the fs root init functions static Josef Bacik
2020-01-22 9:33 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 09/43] btrfs: handle NULL roots in btrfs_put/btrfs_grab_fs_root Josef Bacik
2020-01-22 9:34 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 10/43] btrfs: hold a ref on fs roots while they're in the radix tree Josef Bacik
2020-01-22 10:06 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 11/43] btrfs: hold a ref on the root in resolve_indirect_ref Josef Bacik
2020-01-17 21:25 ` [PATCH 12/43] btrfs: hold a root ref in btrfs_get_dentry Josef Bacik
2020-01-17 21:25 ` [PATCH 13/43] btrfs: hold a ref on the root in __btrfs_run_defrag_inode Josef Bacik
2020-01-17 21:25 ` [PATCH 14/43] btrfs: hold a ref on the root in fixup_tree_root_location Josef Bacik
2020-01-17 21:25 ` [PATCH 15/43] btrfs: hold a ref on the root in create_subvol Josef Bacik
2020-01-17 21:25 ` [PATCH 16/43] btrfs: hold a ref on the root in search_ioctl Josef Bacik
2020-01-17 21:25 ` [PATCH 17/43] btrfs: hold a ref on the root in btrfs_search_path_in_tree Josef Bacik
2020-01-17 21:25 ` [PATCH 18/43] btrfs: hold a ref on the root in btrfs_search_path_in_tree_user Josef Bacik
2020-01-17 21:25 ` [PATCH 19/43] btrfs: hold a ref on the root in btrfs_ioctl_get_subvol_info Josef Bacik
2020-01-17 21:25 ` [PATCH 20/43] btrfs: hold ref on root in btrfs_ioctl_default_subvol Josef Bacik
2020-01-17 21:25 ` [PATCH 21/43] btrfs: hold a ref on the root in build_backref_tree Josef Bacik
2020-01-17 21:25 ` [PATCH 22/43] btrfs: hold a ref on the root in prepare_to_merge Josef Bacik
2020-01-17 21:25 ` [PATCH 23/43] btrfs: hold a ref on the root in merge_reloc_roots Josef Bacik
2020-01-17 21:25 ` [PATCH 24/43] btrfs: hold a ref on the root in record_reloc_root_in_trans Josef Bacik
2020-01-17 21:25 ` [PATCH 25/43] btrfs: hold a ref on the root in find_data_references Josef Bacik
2020-01-17 21:25 ` [PATCH 26/43] btrfs: hold a ref on the root in create_reloc_inode Josef Bacik
2020-01-17 21:25 ` [PATCH 27/43] btrfs: hold a ref on the root in btrfs_recover_relocation Josef Bacik
2020-01-17 21:25 ` [PATCH 28/43] btrfs: push grab_fs_root into read_fs_root Josef Bacik
2020-01-17 21:25 ` [PATCH 29/43] btrfs: hold a ref for the root in btrfs_find_orphan_roots Josef Bacik
2020-01-17 21:25 ` [PATCH 30/43] btrfs: hold a ref on the root in scrub_print_warning_inode Josef Bacik
2020-01-17 21:25 ` [PATCH 31/43] btrfs: hold a ref on the root in btrfs_ioctl_send Josef Bacik
2020-01-17 21:25 ` [PATCH 32/43] btrfs: hold a ref on the root in get_subvol_name_from_objectid Josef Bacik
2020-01-17 21:25 ` [PATCH 33/43] btrfs: hold a ref on the root in create_pending_snapshot Josef Bacik
2020-01-17 21:25 ` [PATCH 34/43] btrfs: hold a ref on the root in btrfs_recover_log_trees Josef Bacik
2020-01-17 21:25 ` [PATCH 35/43] btrfs: hold a ref on the root in btrfs_check_uuid_tree_entry Josef Bacik
2020-01-17 21:25 ` [PATCH 36/43] btrfs: hold a ref on the root in open_ctree Josef Bacik
2020-01-22 10:48 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 37/43] btrfs: use btrfs_put_fs_root to free roots always Josef Bacik
2020-01-22 15:05 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 38/43] btrfs: push btrfs_grab_fs_root into btrfs_get_fs_root Josef Bacik
2020-01-17 21:25 ` [PATCH 39/43] btrfs: free more things in btrfs_free_fs_info Josef Bacik
2020-01-22 10:23 ` Nikolay Borisov
2020-01-22 10:49 ` Nikolay Borisov
2020-01-23 11:58 ` Nikolay Borisov
2020-01-17 21:25 ` [PATCH 40/43] btrfs: move fs_info init work into it's own helper function Josef Bacik
2020-01-23 12:28 ` Nikolay Borisov
2020-01-17 21:26 ` [PATCH 41/43] btrfs: make the init of static elements in fs_info separate Josef Bacik
2020-01-23 12:30 ` Nikolay Borisov [this message]
2020-01-23 12:34 ` Nikolay Borisov
2020-01-24 14:25 ` Josef Bacik
2020-01-17 21:26 ` [PATCH 42/43] btrfs: add a leak check for roots Josef Bacik
2020-01-23 12:33 ` Nikolay Borisov
2020-01-17 21:26 ` [PATCH 43/43] btrfs: rename btrfs_put_fs_root and btrfs_grab_fs_root Josef Bacik
2020-01-23 12:35 ` Nikolay Borisov
-- strict thread matches above, loose matches on Subject: below --
2020-01-17 13:47 [PATCH 00/43][v3] Cleanup how we handle root refs, part 2 Josef Bacik
2020-01-17 13:47 ` [PATCH 41/43] btrfs: make the init of static elements in fs_info separate Josef Bacik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=987b7059-0bc8-b4ad-0898-5c50c6ac762b@suse.com \
--to=nborisov@suse.com \
--cc=josef@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox