From: Chao Yu <chao@kernel.org>
To: Sheng Yong <shengyong2026@sina.com>, xiang@kernel.org
Cc: chao@kernel.org, linux-erofs@lists.ozlabs.org,
linux-kernel@vger.kernel.org, Sheng Yong <shengyong1@xiaomi.com>,
chenguanyou <chenguanyou@xiaomi.com>,
Yunlei He <heyunlei@xiaomi.com>
Subject: Re: [PATCH v2] erofs: set fileio bio failed in short read case
Date: Tue, 3 Mar 2026 15:55:03 +0800 [thread overview]
Message-ID: <59f168be-36ee-4982-b1fe-727e88484b59@kernel.org> (raw)
In-Reply-To: <20260227023008.147813-1-shengyong2026@sina.com>
On 2026/2/27 10:30, Sheng Yong wrote:
> From: Sheng Yong <shengyong1@xiaomi.com>
>
> For file-backed mount, IO requests are handled by vfs_iocb_iter_read().
> However, it can be interrupted by SIGKILL, returning the number of
> bytes actually copied. Unused folios in bio are unexpectedly marked
> as uptodate.
>
> vfs_read
> filemap_read
> filemap_get_pages
> filemap_readahead
> erofs_fileio_readahead
> erofs_fileio_rq_submit
> vfs_iocb_iter_read
> filemap_read
> filemap_get_pages <= detect signal
> erofs_fileio_ki_complete <= set all folios uptodate
>
> This patch addresses this by setting short read bio with an error
> directly.
>
> Fixes: bc804a8d7e86 ("erofs: handle end of filesystem properly for file-backed mounts")
> Reported-by: chenguanyou <chenguanyou@xiaomi.com>
> Signed-off-by: Yunlei He <heyunlei@xiaomi.com>
> Signed-off-by: Sheng Yong <shengyong1@xiaomi.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
prev parent reply other threads:[~2026-03-03 7:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-27 2:30 [PATCH v2] erofs: set fileio bio failed in short read case Sheng Yong
2026-02-27 3:41 ` Gao Xiang
2026-03-03 7:55 ` Chao Yu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59f168be-36ee-4982-b1fe-727e88484b59@kernel.org \
--to=chao@kernel.org \
--cc=chenguanyou@xiaomi.com \
--cc=heyunlei@xiaomi.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=shengyong1@xiaomi.com \
--cc=shengyong2026@sina.com \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox