From: Zhang Yi <yi.zhang@huaweicloud.com>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu,
adilger.kernel@dilger.ca, yi.zhang@huawei.com,
yukuai3@huawei.com, chengzhihao1@huawei.com
Subject: Re: [PATCH v2 3/6] jbd2: remove journal_clean_one_cp_list()
Date: Tue, 6 Jun 2023 21:58:33 +0800 [thread overview]
Message-ID: <b96f43f9-bb00-3a6b-d428-bf122c3cd04f@huaweicloud.com> (raw)
In-Reply-To: <20230606074637.6purq76gaae366t3@quack3>
On 2023/6/6 15:46, Jan Kara wrote:
> On Tue 06-06-23 14:14:44, Zhang Yi wrote:
>> From: Zhang Yi <yi.zhang@huawei.com>
>>
>> journal_clean_one_cp_list() and journal_shrink_one_cp_list() are almost
>> the same, so merge them into journal_shrink_one_cp_list(), remove the
>> nr_to_scan parameter, always scan and try to free the whole checkpoint
>> list.
>>
>> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
>
> Looks good. Just one nit below:
>
>> @@ -398,15 +358,14 @@ static int journal_clean_one_cp_list(struct journal_head *jh, bool destroy)
>> * Called with j_list_lock held.
>> */
>> static unsigned long journal_shrink_one_cp_list(struct journal_head *jh,
>> - unsigned long *nr_to_scan,
>> - bool *released)
>> + bool destroy, bool *released)
>> {
>> struct journal_head *last_jh;
>> struct journal_head *next_jh = jh;
>> unsigned long nr_freed = 0;
>> int ret;
>
> When changing this function, I think it will be more robust calling
> convention to unconditionally set *released = false at the beginning of
> this function. Then we can remove the initialization from
> __jbd2_journal_clean_checkpoint_list().
>
Thanks for the review, will change it in my next iteration.
Yi.
next prev parent reply other threads:[~2023-06-06 13:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 6:14 [PATCH v2 0/6] jbd2: fix several checkpoint inconsistent issues Zhang Yi
2023-06-06 6:14 ` [PATCH v2 1/6] jbd2: recheck chechpointing non-dirty buffer Zhang Yi
2023-06-06 6:14 ` [PATCH v2 2/6] jbd2: remove t_checkpoint_io_list Zhang Yi
2023-06-06 6:14 ` [PATCH v2 3/6] jbd2: remove journal_clean_one_cp_list() Zhang Yi
2023-06-06 7:46 ` Jan Kara
2023-06-06 13:58 ` Zhang Yi [this message]
2023-06-06 6:14 ` [PATCH v2 4/6] jbd2: Fix wrongly judgement for buffer head removing while doing checkpoint Zhang Yi
2023-06-06 8:01 ` Jan Kara
2023-06-06 6:14 ` [PATCH v2 5/6] jbd2: fix a race when checking checkpoint buffer busy Zhang Yi
2023-06-06 7:59 ` Jan Kara
2023-06-06 6:14 ` [PATCH v2 6/6] jbd2: remove __journal_try_to_free_buffer() Zhang Yi
2023-06-06 7:56 ` Jan Kara
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=b96f43f9-bb00-3a6b-d428-bf122c3cd04f@huaweicloud.com \
--to=yi.zhang@huaweicloud.com \
--cc=adilger.kernel@dilger.ca \
--cc=chengzhihao1@huawei.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.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