GNU bug report logs - #77887
libparted detects ext4 without journal as ext2

Previous Next

Package: parted;

Reported by: Pascal Hambourg <pascal <at> plouf.fr.eu.org>

Date: Fri, 18 Apr 2025 04:51:13 UTC

Severity: minor

Tags: easy, patch

Found in version 3.6

To reply to this bug, email your comments to 77887 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#77887; Package parted. (Fri, 18 Apr 2025 04:51:14 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pascal Hambourg <pascal <at> plouf.fr.eu.org>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Fri, 18 Apr 2025 04:51:14 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pascal Hambourg <pascal <at> plouf.fr.eu.org>
To: bug-parted <at> gnu.org
Subject: libparted detects ext4 without journal as ext2
Date: Thu, 17 Apr 2025 22:06:30 +0200
[Message part 1 (text/plain, inline)]
Package: parted
Version: 3.6
Severity: minor
Tags: patch easy

Reference: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1103454>

Dear maintainers,

libparted wrongly detects ext4 without journal as ext2 instead of ext4.
Steps to reproduce:

truncate -s 1G blob
mkfs.ext4 -O ^has_journal blob
blkid blob -> ext4
parted blob print -> ext2
mount -t ext2 blob /mnt -> "couldn't mount as ext2 due to feature 
incompatibilities"
mount -t ext4 blob /mnt -> ok

In libparted/fs/ext2/interface.c, _ext2_generic_probe() considers ext4 
as a subset of ext3 which is ext2 with journal. IMO this is wrong 
because ext4 without journal may have other incompatible features.

Please consider the attached trivial patch (untested).
[detect-ext4-nojournal.patch (text/x-patch, attachment)]

Information forwarded to bug-parted <at> gnu.org:
bug#77887; Package parted. (Fri, 18 Apr 2025 16:04:05 GMT) Full text and rfc822 format available.

Message #8 received at 77887 <at> debbugs.gnu.org (full text, mbox):

From: Pascal Hambourg <pascal <at> plouf.fr.eu.org>
To: 77887 <at> debbugs.gnu.org
Subject: Re: bug#77887: libparted detects ext4 without journal as ext2
Date: Fri, 18 Apr 2025 18:03:09 +0200
FWIW I did very basic testing with the patch applied on Debian, now 
parted detects ext* filesystems as expected:

mkfs.ext2 -> ext2
mkfs.ext3 -> ext3
mkfs.ext4 -> ext4
mkfs.ext4 -O ^has_journal -> ext4





This bug report was last modified 5 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.