[parted-devel] [PATCH] libparted detects ext4 without journal as ext2
Brian C. Lane
bcl at redhat.com
Wed May 28 20:08:40 BST 2025
On Sat, Apr 19, 2025 at 08:56:42AM +0200, Pascal Hambourg wrote:
> ext4 may have other incompatible features than journal and cannot be
> mounted as ext2 by linux, so detect it as ext4 even without journal
> if it has other incompatible features.
Thanks! Sorry it took so long for me to review this. It looks fine to
me, and makes sense. I've confirmed all the flags checked by the ext4
block are ext4 only so checking them outside the ext3 check won't cause
problems.
I added a test for this to t1700, and this also needed a change to t3200
where it makes a filesystem that's too small for a journal which used to
be reported as ext2 when it wasn't.
I wouldn't normally recommend using the parted filesystem probe results
as a way to identify a filesystem, but this is obviously a bug.
I also found that the 'file' program (at least file-5.45-7.fc41.x86_64)
reports the wrong filesystem type as well. blkid works correctly in my
tests though, so it may be a good candidate as a backup to parted.
If there are no objections in the next couple days I'll merge this and
get it into Fedora rawhide by Friday.
Thanks,
Brian
--
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart
More information about the parted-devel
mailing list