From: Zhang Yi <yizhang089@gmail.com>
To: Ojaswin Mujoo <ojaswin@linux.ibm.com>,
linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Cc: Ritesh Harjani <ritesh.list@gmail.com>,
Zhang Yi <yi.zhang@huawei.com>, Jan Kara <jack@suse.cz>,
libaokun1@huawei.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 5/8] ext4: propagate flags to ext4_convert_unwritten_extents_endio()
Date: Sat, 17 Jan 2026 17:00:13 +0800 [thread overview]
Message-ID: <770acb41-64be-4446-bcea-ad8b03c5608c@gmail.com> (raw)
In-Reply-To: <91a23f1c21837277b1ba24db359fe928380aa979.1768402426.git.ojaswin@linux.ibm.com>
On 1/14/2026 10:57 PM, Ojaswin Mujoo wrote:
> Currently, callers like ext4_convert_unwritten_extents() pass
> EXT4_EX_NOCACHE flag to avoid caching extents however this is not
> respected by ext4_convert_unwritten_extents_endio(). Hence, modify it to
> accept flags from the caller and to pass the flags on to other extent
> manipulation functions it calls. This makes sure the NOCACHE flag is
> respected throughout the code path.
>
> Also, since the caller already passes METADATA_NOFAIL and CONVERT flags
> we don't need to explicitly pass it anymore.
>
> Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
> Reviewed-by: Jan Kara <jack@suse.cz>
It looks good to me.
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
> ---
> fs/ext4/extents.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 3d45abfb13cd..54f45b40fe73 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3784,7 +3784,7 @@ static struct ext4_ext_path *ext4_split_convert_extents(handle_t *handle,
> static struct ext4_ext_path *
> ext4_convert_unwritten_extents_endio(handle_t *handle, struct inode *inode,
> struct ext4_map_blocks *map,
> - struct ext4_ext_path *path)
> + struct ext4_ext_path *path, int flags)
> {
> struct ext4_extent *ex;
> ext4_lblk_t ee_block;
> @@ -3801,15 +3801,12 @@ ext4_convert_unwritten_extents_endio(handle_t *handle, struct inode *inode,
> (unsigned long long)ee_block, ee_len);
>
> if (ee_block != map->m_lblk || ee_len > map->m_len) {
> - int flags = EXT4_GET_BLOCKS_CONVERT |
> - EXT4_GET_BLOCKS_METADATA_NOFAIL;
> -
> path = ext4_split_convert_extents(handle, inode, map, path,
> flags, NULL);
> if (IS_ERR(path))
> return path;
>
> - path = ext4_find_extent(inode, map->m_lblk, path, 0);
> + path = ext4_find_extent(inode, map->m_lblk, path, flags);
> if (IS_ERR(path))
> return path;
> depth = ext_depth(inode);
> @@ -3942,7 +3939,7 @@ ext4_ext_handle_unwritten_extents(handle_t *handle, struct inode *inode,
> /* IO end_io complete, convert the filled extent to written */
> if (flags & EXT4_GET_BLOCKS_CONVERT) {
> path = ext4_convert_unwritten_extents_endio(handle, inode,
> - map, path);
> + map, path, flags);
> if (IS_ERR(path))
> return path;
> ext4_update_inode_fsync_trans(handle, inode, 1);
next prev parent reply other threads:[~2026-01-17 9:00 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-14 14:57 [PATCH v2 0/8] ext4 extent split/convert refactor and kunit tests Ojaswin Mujoo
2026-01-14 14:57 ` [PATCH v2 1/8] ext4: kunit tests for extent splitting and conversion Ojaswin Mujoo
2026-01-15 10:20 ` Jan Kara
2026-01-16 5:36 ` Ojaswin Mujoo
2026-01-17 8:47 ` Zhang Yi
2026-01-14 14:57 ` [PATCH v2 2/8] ext4: kunit tests for higher level extent manipulation functions Ojaswin Mujoo
2026-01-15 10:35 ` Jan Kara
2026-01-17 8:48 ` Zhang Yi
2026-01-14 14:57 ` [PATCH v2 3/8] ext4: Add extent status cache support to kunit tests Ojaswin Mujoo
2026-01-15 10:38 ` Jan Kara
2026-01-17 8:58 ` Zhang Yi
2026-01-14 14:57 ` [PATCH v2 4/8] ext4: propagate flags to convert_initialized_extent() Ojaswin Mujoo
2026-01-15 10:59 ` Jan Kara
2026-01-16 5:35 ` Ojaswin Mujoo
2026-01-17 8:59 ` Zhang Yi
2026-01-14 14:57 ` [PATCH v2 5/8] ext4: propagate flags to ext4_convert_unwritten_extents_endio() Ojaswin Mujoo
2026-01-17 9:00 ` Zhang Yi [this message]
2026-01-14 14:57 ` [PATCH v2 6/8] ext4: Refactor zeroout path and handle all cases Ojaswin Mujoo
2026-01-15 12:01 ` Jan Kara
2026-01-16 5:35 ` Ojaswin Mujoo
2026-01-17 8:00 ` Zhang Yi
2026-01-19 11:47 ` Ojaswin Mujoo
2026-01-14 14:57 ` [PATCH v2 7/8] ext4: Refactor split and convert extents Ojaswin Mujoo
2026-01-17 9:00 ` Zhang Yi
2026-01-14 14:57 ` [PATCH v2 8/8] ext4: Allow zeroout when doing written to unwritten split Ojaswin Mujoo
2026-01-17 9:01 ` Zhang Yi
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=770acb41-64be-4446-bcea-ad8b03c5608c@gmail.com \
--to=yizhang089@gmail.com \
--cc=jack@suse.cz \
--cc=libaokun1@huawei.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
--cc=tytso@mit.edu \
--cc=yi.zhang@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