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>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Pascal Hambourg <pascal <at> plouf.fr.eu.org>
To: 77887 <at> debbugs.gnu.org
Subject: bug#77887: 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)]

This bug report was last modified 12 days ago.

Previous Next


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