Ticket #188 (new defect)

Opened 1 year ago

Last modified 6 months ago

Ext4 detected as ext3

Reported by: Patrick Verner Assigned to:
Priority: major Milestone: 1.8.9
Component: libparted Version: 1.8.8
Keywords: Cc:

Description

ext4 file systems detected as ext3 even after mounted with "-o extents" and blkid detects it as ext4. It's possible incorrect detection could result in somebody accidentally deleting a partition.

Attachments

Change History

(follow-up: ↓ 2 ) 01/05/09 17:51:31 changed by rishi-guest

Here is a prelimary patch to probe Ext4 filesystems: http://rishi.fedorapeople.org/gnu/parted-ext4-probe.patch Could not attach the patch since Trac threw an error.

(in reply to: ↑ 1 ) 01/05/09 19:43:59 changed by rishi-guest

01/05/09 22:32:42 changed by gedakc

Rishi, the latest patch works well for detecting ext4 file systems. Also the older ext2 and ext3 file systems appear to be detected correctly too.

There is one small problem in that the $type variable is not substituted when "make check" is run. For example:

[user@fedora10 ~/parted]$ make check
<... stuff deleted ...>
*   ok 1: create an $type file system
*   ok 2: probe the $type file system
*   ok 3: create an $type file system
*   ok 4: probe the $type file system
*   ok 5: create an $type file system
*   ok 6: probe the $type file system
* passed all 6 test(s)
PASS: t1700-ext-probe.sh
<... stuff deleted ...>

In the file "tests/t1700-ext-probe.sh", I tried a simple change of single quotes (') to double quotes(") and the variable expansion worked fine.

Great Patch!

Sincerely, Curtis Gedak

01/08/09 14:34:22 changed by cjwatson

Here's a slightly more complete, though still quite skeletal, ext4 support patch that I wrote on Canonical's time (so please credit this to cjwatson@ubuntu.com if you commit it); I wrote this independently before I realised that this ticket exists. rishi and I took fairly similar approaches, though the arguments I used to _ext2_generic_probe differ. The main additions in my patch are that I've fleshed out the superblock with reference to current ext4, I've added (untested) 64-bit block counts support, and that I've added some guards to make sure that bits of libparted that haven't been updated for ext4 throw an exception to avoid people inadvertently trashing their filesystems.

This is enough to support the Debian/Ubuntu installer, I think; at any rate I have an ext4 installation underway now.

I ran into the same problem that rishi did with attaching the patch to Trac, so the patch is here:

http://people.ubuntu.com/~cjwatson/parted-ext4.patch


Add/Change #188 (Ext4 detected as ext3)




Change Properties
Action