Bug 1711880
| Summary: | [RHEL-7.7] e2image against meta_bg enabled ext4 image creates corrupts metadata on some arches | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Boyang Xue <bxue> |
| Component: | e2fsprogs | Assignee: | Lukáš Czerner <lczerner> |
| Status: | CLOSED ERRATA | QA Contact: | Boyang Xue <bxue> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.7 | CC: | esandeen, xzhou |
| Target Milestone: | rc | ||
| Target Release: | 7.7 | ||
| Hardware: | ppc64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | e2fsprogs-1.42.9-18.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-09-29 20:34:14 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: | |||
|
Description
Boyang Xue
2019-05-20 09:55:56 UTC
Hi, thanks for the report. I have not tested this but there were sevaral fixes in this area and I think the wollowing should fix it. Will backport it for the next release.
Thanks!
-Lukas
commit 8b061a641dff1a0becf645f8e6002de79b997b95
Author: Kazuya Mio <k-mio.nec.com>
Date: Sat Mar 17 14:56:15 2018 -0400
libext2fs: fix ext2fs_open2() error for meta_bg image file
dumpe2fs/debugfs can examine the image file by using the -i option.
However, if meta_bg feature is enabled, dumpe2fs/debugfs cannot open
the image file.
$ dumpe2fs -i test.img
dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open test.img
Couldn't find valid filesystem superblock.
In case of specifying an image file, the location of block group descriptors
is the same as the case of default filesystem regardless of meta_bg feature.
So if EXT2_FLAG_IMAGE_FILE flag is set in ext2fs_open2(),
don't use the meta_bg handling.
Signed-off-by: Kazuya Mio <k-mio.nec.com>
Signed-off-by: Theodore Ts'o <tytso>
commit 8b061a641dff1a0becf645f8e6002de79b997b95
Author: Kazuya Mio <k-mio.nec.com>
Date: Sat Mar 17 14:56:15 2018 -0400
libext2fs: fix ext2fs_open2() error for meta_bg image file
dumpe2fs/debugfs can examine the image file by using the -i option.
However, if meta_bg feature is enabled, dumpe2fs/debugfs cannot open
the image file.
$ dumpe2fs -i test.img
dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open test.img
Couldn't find valid filesystem superblock.
In case of specifying an image file, the location of block group descriptors
is the same as the case of default filesystem regardless of meta_bg feature.
So if EXT2_FLAG_IMAGE_FILE flag is set in ext2fs_open2(),
don't use the meta_bg handling.
Signed-off-by: Kazuya Mio <k-mio.nec.com>
Signed-off-by: Theodore Ts'o <tytso>
Looks like more triage & analysis is needed, moving to rhel7.8 Fixed by:
commit bfc1856029ff6851845de27114fea899bbdbccbe
Author: Lukas Czerner <lczerner>
Date: Mon Apr 9 11:58:15 2018 -0400
e2image: fix metadata image handling on big endian systems
Currently e2image metadata image handling and creating is completely
broken on big endian systems. It just does not care about endianness at
all. This was uncovered With addition of i_bitmaps test, which is the
first test that actually tests e2image metadata image.
Fix it by making sure that all on-disk metadata that we write and read
to/from the metadata image is properly converted.
Signed-off-by: Lukas Czerner <lczerner>
Signed-off-by: Theodore Ts'o <tytso>
*** Bug 1806783 has been marked as a duplicate of this bug. *** TEST PASS. Reproduced with e2fsprogs-1.42.9.17.el7 ''' :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: /kernel/filesystems/ext4/1682935-dumpe2fs-meta_bg-image/Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 05:17:01 ] :: [ PASS ] :: Command 'mkfs.ext4 -F -O meta_bg,^resize_inode BZ1682935.img' (Expected 0, got 0) :: [ 05:17:01 ] :: [ PASS ] :: Command 'e2image BZ1682935.img BZ1682935.e2img' (Expected 0, got 0) :: [ 05:17:01 ] :: [ LOG ] :: Output of 'dumpe2fs -i BZ1682935.e2img': :: [ 05:17:01 ] :: [ LOG ] :: --------------- OUTPUT START --------------- :: [ 05:17:01 ] :: [ LOG ] :: Couldn't find valid filesystem superblock. :: [ 05:17:01 ] :: [ LOG ] :: dumpe2fs 1.42.9 (28-Dec-2013) :: [ 05:17:01 ] :: [ LOG ] :: dumpe2fs: Bad magic number in super-block while trying to open BZ1682935.e2img :: [ 05:17:01 ] :: [ LOG ] :: --------------- OUTPUT END --------------- :: [ 05:17:01 ] :: [ FAIL ] :: Command 'dumpe2fs -i BZ1682935.e2img' (Expected 0, got 1) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 0s :: Assertions: 2 good, 1 bad :: RESULT: FAIL (/kernel/filesystems/ext4/1682935-dumpe2fs-meta_bg-image/Test) ''' Verified with e2fsprogs-1.42.9.18.el7 ''' :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: /kernel/filesystems/ext4/1682935-dumpe2fs-meta_bg-image/Test :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: [ 01:59:23 ] :: [ PASS ] :: Command 'mkfs.ext4 -F -O meta_bg,^resize_inode BZ1682935.img' (Expected 0, got 0) :: [ 01:59:23 ] :: [ PASS ] :: Command 'e2image BZ1682935.img BZ1682935.e2img' (Expected 0, got 0) :: [ 01:59:24 ] :: [ PASS ] :: Command 'dumpe2fs -i BZ1682935.e2img' (Expected 0, got 0) :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: Duration: 5s :: Assertions: 3 good, 0 bad :: RESULT: PASS (/kernel/filesystems/ext4/1682935-dumpe2fs-meta_bg-image/Test) ''' Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: e2fsprogs security and bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4011 |