All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Sheng Yong <shengyong2021@gmail.com>, linux-erofs@lists.ozlabs.org
Subject: Re: [PATCH] erofs: mark fileio folios uptodate based on the number of bytes read
Date: Thu, 26 Feb 2026 17:28:40 +0800	[thread overview]
Message-ID: <f748ff61-043f-402a-b4a5-e285a4e5db99@linux.alibaba.com> (raw)
In-Reply-To: <20260226090947.2808686-1-shengyong1@xiaomi.com>

Hi Yong,

On 2026/2/26 17:09, 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. Although unused folios are zero filled, they
> are unexpectedly marked as uptodate.
> This patch addresses this by setting folios uptodate based on the actual
> number of bytes read for the plain backing file. And for the compressed
> backing file, there may not have sufficient data for decompression,
> in such case, the bio is marked with an error directly.
> 
> Fixes: ce63cb62d794 ("erofs: support unencoded inodes for fileio")
> Reported-by: chenguanyou <chenguanyou@xiaomi.com>
> Signed-off-by: Yunlei He <heyunlei@xiaomi.com>
> Signed-off-by: Sheng Yong <shengyong1@xiaomi.com>

Yes, it sounds possible. But can we just fail the
whole I/O for both cases?

In principle, we should retry the remaining I/O once more
for short read, but failing the whole I/O could be one
short-term solution.

Thanks,
Gao Xiang



  reply	other threads:[~2026-02-26  9:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-26  9:09 [PATCH] erofs: mark fileio folios uptodate based on the number of bytes read Sheng Yong
2026-02-26  9:28 ` Gao Xiang [this message]
2026-02-26  9:36   ` Gao Xiang
2026-02-26  9:50     ` Sheng Yong

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=f748ff61-043f-402a-b4a5-e285a4e5db99@linux.alibaba.com \
    --to=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=shengyong2021@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.