From: Jan Kara <jack@suse.cz>
To: yangerkun <yangerkun@huawei.com>
Cc: tytso@mit.edu, jack@suse.com, linux-ext4@vger.kernel.org,
yukuai3@huawei.com
Subject: Re: [PATCH] ext4: no need to verify new add extent block
Date: Wed, 9 Jun 2021 11:57:03 +0200 [thread overview]
Message-ID: <20210609095703.GK5562@quack2.suse.cz> (raw)
In-Reply-To: <20210609075545.1442160-1-yangerkun@huawei.com>
On Wed 09-06-21 15:55:45, yangerkun wrote:
> ext4_ext_grow_indepth will add a new extent block which has init the
> expected content. We can mark this buffer as verified so to stop a
> useless check in __read_extent_tree_block.
>
> Signed-off-by: yangerkun <yangerkun@huawei.com>
Looks good. Feel free to add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/extents.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index cbf37b2cf871..6ca5be8a8fc2 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -1306,6 +1306,7 @@ static int ext4_ext_grow_indepth(handle_t *handle, struct inode *inode,
> neh->eh_magic = EXT4_EXT_MAGIC;
> ext4_extent_block_csum_set(inode, neh);
> set_buffer_uptodate(bh);
> + set_buffer_verified(bh);
> unlock_buffer(bh);
>
> err = ext4_handle_dirty_metadata(handle, inode, bh);
> --
> 2.31.1
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2021-06-09 10:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 7:55 [PATCH] ext4: no need to verify new add extent block yangerkun
2021-06-09 9:57 ` Jan Kara [this message]
2021-06-24 14:29 ` Theodore Ts'o
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=20210609095703.GK5562@quack2.suse.cz \
--to=jack@suse.cz \
--cc=jack@suse.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yangerkun@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;
as well as URLs for NNTP newsgroup(s).