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

Done: "Brian C. Lane" <bcl <at> redhat.com>

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pascal Hambourg <pascal <at> plouf.fr.eu.org>
Subject: bug#77887: closed (Re: bug#77887: libparted detects ext4 without
 journal as ext2)
Date: Wed, 28 May 2025 20:59:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#77887: libparted detects ext4 without journal as ext2

which was filed against the parted package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 77887 <at> debbugs.gnu.org.

-- 
77887: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77887
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: "Brian C. Lane" <bcl <at> redhat.com>
To: 77887-done <at> debbugs.gnu.org
Subject: Re: bug#77887: libparted detects ext4 without journal as ext2
Date: Wed, 28 May 2025 13:58:34 -0700
-- 
Brian C. Lane (PST8PDT) - weldr.io - lorax - parted - pykickstart


[Message part 3 (message/rfc822, inline)]
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 4 (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)]

This bug report was last modified 20 days ago.

Previous Next


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