* [PATCH] erofs: refine warning messages for data I/Os
@ 2023-08-09 6:06 Ferry Meng
2023-08-09 6:38 ` Gao Xiang
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ferry Meng @ 2023-08-09 6:06 UTC (permalink / raw)
To: linux-erofs; +Cc: LKML, Ferry Meng
Don't warn users since -EINTR is returned due to user interruption.
Also suppress warning messages of readmore.
Signed-off-by: Ferry Meng <mengferry@linux.alibaba.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);
--
2.19.1.6.gb485710b
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] erofs: refine warning messages for data I/Os
2023-08-09 6:06 [PATCH] erofs: refine warning messages for data I/Os Ferry Meng
@ 2023-08-09 6:38 ` Gao Xiang
2023-08-10 2:20 ` Yue Hu
2023-08-23 14:36 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2023-08-09 6:38 UTC (permalink / raw)
To: Ferry Meng, linux-erofs; +Cc: LKML
On 2023/8/9 14:06, Ferry Meng wrote:
> Don't warn users since -EINTR is returned due to user interruption.
> Also suppress warning messages of readmore.
>
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Thanks,
Gao Xiang
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] erofs: refine warning messages for data I/Os
2023-08-09 6:06 [PATCH] erofs: refine warning messages for data I/Os Ferry Meng
2023-08-09 6:38 ` Gao Xiang
@ 2023-08-10 2:20 ` Yue Hu
2023-08-23 14:36 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Yue Hu @ 2023-08-10 2:20 UTC (permalink / raw)
To: Ferry Meng; +Cc: linux-erofs, LKML, huyue2
On Wed, 9 Aug 2023 14:06:37 +0800
Ferry Meng <mengferry@linux.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@linux.alibaba.com>
Reviewed-by: Yue Hu <huyue2@coolpad.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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] erofs: refine warning messages for data I/Os
2023-08-09 6:06 [PATCH] erofs: refine warning messages for data I/Os Ferry Meng
2023-08-09 6:38 ` Gao Xiang
2023-08-10 2:20 ` Yue Hu
@ 2023-08-23 14:36 ` Chao Yu
2 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2023-08-23 14:36 UTC (permalink / raw)
To: Ferry Meng, linux-erofs; +Cc: LKML
On 2023/8/9 14:06, Ferry Meng wrote:
> Don't warn users since -EINTR is returned due to user interruption.
> Also suppress warning messages of readmore.
>
> Signed-off-by: Ferry Meng <mengferry@linux.alibaba.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-23 14:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-09 6:06 [PATCH] erofs: refine warning messages for data I/Os Ferry Meng
2023-08-09 6:38 ` Gao Xiang
2023-08-10 2:20 ` Yue Hu
2023-08-23 14:36 ` Chao Yu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).