From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Stefan Kerkmann <s.kerkmann@pengutronix.de>,
linux-erofs@lists.ozlabs.org
Subject: Re: [bug report] data corruption of init process
Date: Mon, 20 Jan 2025 09:55:41 +0800 [thread overview]
Message-ID: <109605af-8df5-49dc-be5e-81ec907bfcbf@linux.alibaba.com> (raw)
In-Reply-To: <b73823e2-a976-4831-90c7-405316440236@linux.alibaba.com>
On 2025/1/20 09:45, Gao Xiang wrote:
...
>
> After I picked "erofs: ... i_ino ...., index ...." lines out, sort them,
> and use`sed -e 's/.*(\([0-9a-f]*\))$/\1/'` to parse the sorted items of
> BAD and GOOD cases,
>
> I found each decompressed page cache page (which will be visible to
> the userspace) is the same, so I'm very confused why it could happen.
>
- First of all, could you also confirm the output if the following
patch is applied:
diff --git a/fs/erofs/data.c b/fs/erofs/data.c
index 0cd6b5c4df98..3c2cff623016 100644
--- a/fs/erofs/data.c
+++ b/fs/erofs/data.c
@@ -264,6 +264,11 @@ void erofs_onlinefolio_end(struct folio *folio, int err)
if (v & ~EROFS_ONLINEFOLIO_EIO)
return;
folio->private = 0;
+ ptr = kmap_local_folio(folio, 0);
+ hash = fnv_32_buf(ptr, PAGE_SIZE, FNV1_32_INIT);
+ erofs_info(NULL, "%px i_ino %lu, index %lu dst %px (%x) err %d",
+ folio, folio->mapping->host->i_ino, folio->index, ptr, hash,
+ v & EROFS_ONLINEFOLIO_EIO);
folio_end_read(folio, !(v & EROFS_ONLINEFOLIO_EIO));
}
diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index aff09f94afb2..39d857acd3d0 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1847,7 +1847,7 @@ static int z_erofs_read_folio(struct file *file, struct folio *folio)
/* if some pclusters are ready, need submit them anyway */
err = z_erofs_runqueue(&f, 0) ?: err;
- if (err && err != -EINTR)
+ if (err)
erofs_err(inode->i_sb, "read error %d @ %lu of nid %llu",
err, folio->index, EROFS_I(inode)->nid);
I'd like to know if some error is returned (especially EINTR) to
user space which could cause something...
Thanks,
Gao Xiang
next prev parent reply other threads:[~2025-01-20 1:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-27 10:44 [bug report] data corruption of init process Stefan Kerkmann
2024-12-27 13:24 ` Gao Xiang
2025-01-19 12:07 ` Stefan Kerkmann
2025-01-19 12:48 ` Gao Xiang
2025-01-20 1:45 ` Gao Xiang
2025-01-20 1:55 ` Gao Xiang [this message]
2025-01-20 17:36 ` Stefan Kerkmann
2025-01-21 3:27 ` Gao Xiang
2025-01-21 3:33 ` Gao Xiang
2025-01-21 17:21 ` Stefan Kerkmann
2025-01-22 1:41 ` Gao Xiang
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=109605af-8df5-49dc-be5e-81ec907bfcbf@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=s.kerkmann@pengutronix.de \
/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.