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: <20230810102001.000035ca.zbestahu@gmail.com>
Date:   Thu, 10 Aug 2023 10:20:01 +0800
From:   Yue Hu <zbestahu@...il.com>
To:     Ferry Meng <mengferry@...ux.alibaba.com>
Cc:     linux-erofs@...ts.ozlabs.org, LKML <linux-kernel@...r.kernel.org>,
        huyue2@...lpad.com
Subject: Re: [PATCH] erofs: refine warning messages for data I/Os

On Wed,  9 Aug 2023 14:06:37 +0800
Ferry Meng <mengferry@...ux.alibaba.com> wrote:

erofs: refine warning messages for zdata I/Os

> Don't warn users since -EINTR is returned due to user interruption.
> Also suppress warning messages of readmore.
> 
> Signed-off-by: Ferry Meng <mengferry@...ux.alibaba.com>

Reviewed-by: Yue Hu <huyue2@...lpad.com>

> ---
>  fs/erofs/zdata.c | 23 +++++++++--------------
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
> index de4f12152b62..53820271e538 100644
> --- a/fs/erofs/zdata.c
> +++ b/fs/erofs/zdata.c
> @@ -1848,15 +1848,10 @@ static void z_erofs_pcluster_readmore(struct z_erofs_decompress_frontend *f,
>  
>  		page = erofs_grab_cache_page_nowait(inode->i_mapping, index);
>  		if (page) {
> -			if (PageUptodate(page)) {
> +			if (PageUptodate(page))
>  				unlock_page(page);
> -			} else {
> -				err = z_erofs_do_read_page(f, page);
> -				if (err)
> -					erofs_err(inode->i_sb,
> -						  "readmore error at page %lu @ nid %llu",
> -						  index, EROFS_I(inode)->nid);
> -			}
> +			else
> +				(void)z_erofs_do_read_page(f, page);
>  			put_page(page);
>  		}
>  
> @@ -1885,8 +1880,9 @@ static int z_erofs_read_folio(struct file *file, struct folio *folio)
>  	/* if some compressed cluster ready, need submit them anyway */
>  	z_erofs_runqueue(&f, z_erofs_is_sync_decompress(sbi, 0), false);
>  
> -	if (err)
> -		erofs_err(inode->i_sb, "failed to read, err [%d]", err);
> +	if (err && err != -EINTR)
> +		erofs_err(inode->i_sb, "read error %d @ %lu of nid %llu",
> +			  err, folio->index, EROFS_I(inode)->nid);
>  
>  	erofs_put_metabuf(&f.map.buf);
>  	erofs_release_pages(&f.pagepool);
> @@ -1920,10 +1916,9 @@ static void z_erofs_readahead(struct readahead_control *rac)
>  		head = (void *)page_private(page);
>  
>  		err = z_erofs_do_read_page(&f, page);
> -		if (err)
> -			erofs_err(inode->i_sb,
> -				  "readahead error at page %lu @ nid %llu",
> -				  page->index, EROFS_I(inode)->nid);
> +		if (err && err != -EINTR)
> +			erofs_err(inode->i_sb, "readahead error %d @ %lu of nid %llu",
> +				  err, page->index, EROFS_I(inode)->nid);
>  		put_page(page);
>  	}
>  	z_erofs_pcluster_readmore(&f, rac, false);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ