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: "Brian C. Lane" <bcl <at> redhat.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#77887: closed (libparted detects ext4 without journal as ext2)
Date: Wed, 28 May 2025 20:59:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Wed, 28 May 2025 13:58:34 -0700
with message-id <aDd4-hS4Hv6W9twV <at> ohop.brianlane.com>
and subject line Re: bug#77887: libparted detects ext4 without journal as ext2
has caused the debbugs.gnu.org bug report #77887,
regarding libparted detects ext4 without journal as ext2
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> 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: 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 3 (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)]
[Message part 5 (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



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.