lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <770acb41-64be-4446-bcea-ad8b03c5608c@gmail.com>
Date: Sat, 17 Jan 2026 17:00:13 +0800
From: Zhang Yi <yizhang089@...il.com>
To: Ojaswin Mujoo <ojaswin@...ux.ibm.com>, linux-ext4@...r.kernel.org,
 Theodore Ts'o <tytso@....edu>
Cc: Ritesh Harjani <ritesh.list@...il.com>, Zhang Yi <yi.zhang@...wei.com>,
 Jan Kara <jack@...e.cz>, libaokun1@...wei.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 5/8] ext4: propagate flags to
 ext4_convert_unwritten_extents_endio()

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@...ux.ibm.com>
> Reviewed-by: Jan Kara <jack@...e.cz>

It looks good to me.

Reviewed-by: Zhang Yi <yi.zhang@...wei.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);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ