Bug 2221314
| Summary: | Metadata CRC error detected when mounting xfs zram device on ppc64le | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Michael Armijo <marmijo> |
| Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | acaringi, adscvr, airlied, alciregi, bgilbert, bskeggs, dan, dustymabe, esandeen, hdegoede, hpa, jarodwilson, josef, kernel-maint, lgoncalv, linville, masami256, mchehab, miabbott, ptalbert, steved |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | ppc64le | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | kernel-6.4.11-100.fc37 kernel-6.4.11-200.fc38 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-08-19 00:48:07 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1071880 | ||
|
Description
Michael Armijo
2023-07-07 22:06:24 UTC
We did a kernel bisect with the reproducer developed by @marmijo above and found the offending commit:
```
[root@ibm-p8-kvm-03-guest-02 linux]# git bisect good
af8b04c63708fa730c0257084fab91fb2a9cecc4 is the first bad commit
commit af8b04c63708fa730c0257084fab91fb2a9cecc4
Author: Christoph Hellwig <hch>
Date: Tue Apr 11 19:14:46 2023 +0200
zram: simplify bvec iteration in __zram_make_request
bio_for_each_segment synthetize bvecs that never cross page boundaries, so
don't duplicate that work in an inner loop.
Link: https://lkml.kernel.org/r/20230411171459.567614-5-hch@lst.de
Signed-off-by: Christoph Hellwig <hch>
Reviewed-by: Sergey Senozhatsky <senozhatsky>
Acked-by: Minchan Kim <minchan>
Cc: Jens Axboe <axboe>
Signed-off-by: Andrew Morton <akpm>
drivers/block/zram/zram_drv.c | 42 +++++++++++-------------------------------
1 file changed, 11 insertions(+), 31 deletions(-)
```
cross referencing:
- Fedora CoreOS issue tracker:
- https://github.com/coreos/fedora-coreos-tracker/issues/1489
- linux-kernel.org post:
- https://lkml.org/lkml/2023/8/1/1629
The fix landed upstream in:
```
commit 95848dcb9d676738411a8ff70a9704039f1b3982
Refs: v6.4-11516-g95848dcb9d67
Author: Christoph Hellwig <hch>
AuthorDate: Sat Aug 5 07:55:37 2023 +0200
Commit: Jens Axboe <axboe>
CommitDate: Sat Aug 5 16:13:15 2023 -0600
zram: take device and not only bvec offset into account
Commit af8b04c63708 ("zram: simplify bvec iteration in
__zram_make_request") changed the bio iteration in zram to rely on the
implicit capping to page boundaries in bio_for_each_segment. But it
failed to care for the fact zram not only care about the page alignment
of the bio payload, but also the page alignment into the device. For
buffered I/O and swap those are the same, but for direct I/O or kernel
internal I/O like XFS log buffer writes they can differ.
Fix this by open coding bio_for_each_segment and limiting the bvec len
so that it never crosses over a page alignment boundary in the device
in addition to the payload boundary already taken care of by
bio_iter_iovec.
Cc: stable.org
Fixes: af8b04c63708 ("zram: simplify bvec iteration in __zram_make_request")
Reported-by: Dusty Mabe <dusty>
Signed-off-by: Christoph Hellwig <hch>
Acked-by: Sergey Senozhatsky <senozhatsky>
Link: https://lore.kernel.org/r/20230805055537.147835-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe>
---
drivers/block/zram/zram_drv.c | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
```
FEDORA-2023-1ccaad9e2e has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-1ccaad9e2e FEDORA-2023-cb2ef9c22c has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-cb2ef9c22c FEDORA-2023-1ccaad9e2e has been pushed to the Fedora 38 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-1ccaad9e2e` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-1ccaad9e2e See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-cb2ef9c22c has been pushed to the Fedora 37 testing repository. Soon you'll be able to install the update with the following command: `sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-cb2ef9c22c` You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-cb2ef9c22c See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates. FEDORA-2023-cb2ef9c22c has been pushed to the Fedora 37 stable repository. If problem still persists, please make note of it in this bug report. FEDORA-2023-1ccaad9e2e has been pushed to the Fedora 38 stable repository. If problem still persists, please make note of it in this bug report. |