From: Qu Wenruo <wqu@suse.com>
To: Nikolay Borisov <nborisov@suse.com>,
Qu Wenruo <quwenruo.btrfs@gmx.com>,
linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2] btrfs: make btrfs module init/exit match their sequence
Date: Thu, 13 Oct 2022 17:51:09 +0800 [thread overview]
Message-ID: <7aae4b29-ec0d-db3c-c08e-ad9ab6b448a1@suse.com> (raw)
In-Reply-To: <2c0f8168-3c30-6826-e035-6ab018ed3074@suse.com>
On 2022/10/13 17:29, Nikolay Borisov wrote:
>
>
> On 13.10.22 г. 12:22 ч., Qu Wenruo wrote:
>>> ?
>>
>> For adding a new sequence, one has to understand the dependency (if any).
>>
>> If no dependency (which I believe is the most common case), then the
>> generic idea is just to add it before the selftest.
>>
>>
>> The question would be more critical for open_ctree(), in fact
>> open_ctree() has a lot of cases that something can only be initialized
>> after its dependency.
>>
>> In that case, your concern is correct, one has to go through the init
>> functions to find a proper location.
>> And unlike the original code, it's one extra level of indirection.
>>
>> But I'd say, for most part, the init function names should explain
>> themselves, thus I hope it won't cause too much hassles in the future.
>
>
> In this case I'd say open_ctree shouldn't be switched to this mechanism.
The truth is, open_ctree() has the worst mismatch in its init sequence,
almost half of the error labels are not properly matched.
And for the several init functions which needs dependency, it's not that
hard to grasp and put into proper order.
Thanks,
Qu
next prev parent reply other threads:[~2022-10-13 9:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 9:22 [PATCH v2] btrfs: make btrfs module init/exit match their sequence Qu Wenruo
2022-10-13 6:03 ` Anand Jain
2022-10-13 6:44 ` Qu Wenruo
2022-10-13 13:46 ` Anand Jain
2022-10-13 23:14 ` Qu Wenruo
2022-10-14 0:10 ` Anand Jain
2022-10-14 0:17 ` Qu Wenruo
2022-10-14 12:08 ` David Sterba
2022-10-13 9:14 ` Nikolay Borisov
2022-10-13 9:22 ` Qu Wenruo
2022-10-13 9:29 ` Nikolay Borisov
2022-10-13 9:51 ` Qu Wenruo [this message]
2022-10-17 18:07 ` David Sterba
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=7aae4b29-ec0d-db3c-c08e-ad9ab6b448a1@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=nborisov@suse.com \
--cc=quwenruo.btrfs@gmx.com \
/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;
as well as URLs for NNTP newsgroup(s).