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: <20200430210211.2A2A0AE04D@d06av26.portsmouth.uk.ibm.com>
Date:   Fri, 1 May 2020 02:32:10 +0530
From:   Ritesh Harjani <riteshh@...ux.ibm.com>
To:     Eric Whitney <enwlinux@...il.com>, linux-ext4@...r.kernel.org
Cc:     tytso@....edu
Subject: Re: [PATCH 1/4] ext4: remove dead GET_BLOCKS_ZERO code


On 5/1/20 12:23 AM, Eric Whitney wrote:
> There's no call to ext4_map_blocks() in the current ext4 code with a
> flags argument that combines EXT4_GET_BLOCKS_CONVERT and
> EXT4_GET_BLOCKS_ZERO.  Remove the code that corresponds to this case
> from ext4_ext_handle_unwritten_extents().
> 
> Signed-off-by: Eric Whitney <enwlinux@...il.com>

As I see it. Yes, this flag was mainly added for DAX handling at two 
places but mostly with below purpose.

Purpose:- Since DAX earlier using PRE_IO flag and then to convert
unwritten to written, it added this extra functionality to zero out.
Since ext4_map_blocks already implements the unwritten to written
functionality, so PRE_IO along with below combination of flags was
removed from DAX path.

Now none of that DAX code path uses below code anyways. So your patch
justifies killing below code snip.


Feel free to add:
Reviewed-by: Ritesh Harjani <riteshh@...ux.ibm.com>

> ---
>   fs/ext4/extents.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index f2b577b315a0..59a90492b9dd 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -3826,14 +3826,6 @@ 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) {
> -		if (flags & EXT4_GET_BLOCKS_ZERO) {
> -			if (allocated > map->m_len)
> -				allocated = map->m_len;
> -			err = ext4_issue_zeroout(inode, map->m_lblk, newblock,
> -						 allocated);
> -			if (err < 0)
> -				goto out2;
> -		}
>   		ret = ext4_convert_unwritten_extents_endio(handle, inode, map,
>   							   ppath);
>   		if (ret >= 0)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ