* [PATCH] ext4: no need to verify new add extent block
@ 2021-06-09 7:55 yangerkun
2021-06-09 9:57 ` Jan Kara
2021-06-24 14:29 ` Theodore Ts'o
0 siblings, 2 replies; 3+ messages in thread
From: yangerkun @ 2021-06-09 7:55 UTC (permalink / raw)
To: tytso, jack; +Cc: linux-ext4, yangerkun, yukuai3
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>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: no need to verify new add extent block
2021-06-09 7:55 [PATCH] ext4: no need to verify new add extent block yangerkun
@ 2021-06-09 9:57 ` Jan Kara
2021-06-24 14:29 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2021-06-09 9:57 UTC (permalink / raw)
To: yangerkun; +Cc: tytso, jack, linux-ext4, yukuai3
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ext4: no need to verify new add extent block
2021-06-09 7:55 [PATCH] ext4: no need to verify new add extent block yangerkun
2021-06-09 9:57 ` Jan Kara
@ 2021-06-24 14:29 ` Theodore Ts'o
1 sibling, 0 replies; 3+ messages in thread
From: Theodore Ts'o @ 2021-06-24 14:29 UTC (permalink / raw)
To: yangerkun; +Cc: jack, linux-ext4, yukuai3
On Wed, Jun 09, 2021 at 03:55:45PM +0800, 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>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-24 14:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-09 7:55 [PATCH] ext4: no need to verify new add extent block yangerkun
2021-06-09 9:57 ` Jan Kara
2021-06-24 14:29 ` Theodore Ts'o
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).