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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210930161030.GA17404@quack2.suse.cz>
Date:   Thu, 30 Sep 2021 18:10:30 +0200
From:   Jan Kara <jack@...e.cz>
To:     yangerkun <yangerkun@...wei.com>
Cc:     tytso@....edu, jack@...e.cz, linux-ext4@...r.kernel.org,
        yukuai3@...wei.com
Subject: Re: [PATCH 1/3] ext4: correct the left/middle/right debug message
 for binsearch

On Fri 03-09-21 14:27:46, yangerkun wrote:
> The debuginfo for binsearch want to show the left/middle/right extent
> while the process search for the goal block. However we show this info
> after we change right or left.
> 
> Signed-off-by: yangerkun <yangerkun@...wei.com>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> ---
>  fs/ext4/extents.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index c33e0a2cb6c3..7ae32078b48f 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -713,13 +713,14 @@ ext4_ext_binsearch_idx(struct inode *inode,
>  	r = EXT_LAST_INDEX(eh);
>  	while (l <= r) {
>  		m = l + (r - l) / 2;
> +		ext_debug(inode, "%p(%u):%p(%u):%p(%u) ", l,
> +			  le32_to_cpu(l->ei_block), m, le32_to_cpu(m->ei_block),
> +			  r, le32_to_cpu(r->ei_block));
> +
>  		if (block < le32_to_cpu(m->ei_block))
>  			r = m - 1;
>  		else
>  			l = m + 1;
> -		ext_debug(inode, "%p(%u):%p(%u):%p(%u) ", l,
> -			  le32_to_cpu(l->ei_block), m, le32_to_cpu(m->ei_block),
> -			  r, le32_to_cpu(r->ei_block));
>  	}
>  
>  	path->p_idx = l - 1;
> @@ -781,13 +782,14 @@ ext4_ext_binsearch(struct inode *inode,
>  
>  	while (l <= r) {
>  		m = l + (r - l) / 2;
> +		ext_debug(inode, "%p(%u):%p(%u):%p(%u) ", l,
> +			  le32_to_cpu(l->ee_block), m, le32_to_cpu(m->ee_block),
> +			  r, le32_to_cpu(r->ee_block));
> +
>  		if (block < le32_to_cpu(m->ee_block))
>  			r = m - 1;
>  		else
>  			l = m + 1;
> -		ext_debug(inode, "%p(%u):%p(%u):%p(%u) ", l,
> -			  le32_to_cpu(l->ee_block), m, le32_to_cpu(m->ee_block),
> -			  r, le32_to_cpu(r->ee_block));
>  	}
>  
>  	path->p_ext = l - 1;
> -- 
> 2.31.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ