From: Chao Yu <yuchao0@huawei.com>
To: Daeho Jeong <daeho43@gmail.com>
Cc: <linux-kernel@vger.kernel.org>,
<linux-f2fs-devel@lists.sourceforge.net>,
<kernel-team@android.com>, Jaegeuk Kim <jaegeuk@kernel.org>,
Daeho Jeong <daehojeong@google.com>
Subject: Re: [f2fs-dev] [PATCH v3] f2fs: fix race of pending_pages in decompression
Date: Mon, 7 Dec 2020 15:41:38 +0800 [thread overview]
Message-ID: <c45d327f-b669-a0ec-bd77-0c95dfd8db2c@huawei.com> (raw)
In-Reply-To: <CACOAw_zwbmYHbUVUmzGMci9SaSVSrP8NXXavHBSSLxbAEOrMcw@mail.gmail.com>
On 2020/12/7 15:28, Daeho Jeong wrote:
>> It looks like it will be better to move this into merge condition?
>>
>> if (bio && (!page_is_mergeable(sbi, bio,
>> *last_block_in_bio, blkaddr) ||
>> !f2fs_crypt_mergeable_bio(bio, inode, page->index, NULL) ||
>> f2fs_verify_mergeable_bio())) {
>>
>
> I tried this for the first time, but it requires unnecessary checks
> within the compression cluster.
We only need to check f2fs_verify_mergeable_bio for i == 0 case? something like:
static bool f2fs_verify_mergeable_bio(struct bio *bio, bool verify, bool first_page)
{
if (!first_page)
return false;
if (!verify)
return false;
ctx = bio->bi_private;
if (!(ctx->enabled_steps & (1 << STEP_VERITY)))
return true;
}
Thoughts?
> I wanted to just check one time in the beginning of the cluster.
> What do you think?
It's trivial, but I'm think about the readability... at least, one line comment
is needed to describe why we submit previous bio. :)
Thanks,
> .
>
next prev parent reply other threads:[~2020-12-07 7:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-05 4:26 [PATCH v3] f2fs: fix race of pending_pages in decompression Daeho Jeong
2020-12-07 7:05 ` [f2fs-dev] " Chao Yu
2020-12-07 7:28 ` Daeho Jeong
2020-12-07 7:41 ` Chao Yu [this message]
2020-12-07 16:42 ` Jaegeuk Kim
2020-12-07 20:31 ` Eric Biggers
2020-12-07 23:51 ` Daeho Jeong
2020-12-08 6:11 ` Eric Biggers
2020-12-08 23:55 ` Jaegeuk Kim
2020-12-09 1:34 ` Chao Yu
2020-12-09 3:15 ` Eric Biggers
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=c45d327f-b669-a0ec-bd77-0c95dfd8db2c@huawei.com \
--to=yuchao0@huawei.com \
--cc=daeho43@gmail.com \
--cc=daehojeong@google.com \
--cc=jaegeuk@kernel.org \
--cc=kernel-team@android.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).