Re: vol_id doesn't recognize unjournaled ext4

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 14, 2009 at 07:01:44PM +0100, Kay Sievers wrote:
> On Sat, Mar 14, 2009 at 18:39, Andre Beck <beck@xxxxxx> wrote:
> > fooling around with a Debian Sid/Experimental installation on a USB
> > flash drive, I had some boot issues as /dev/disk/by-{uuid,label} showed
> > no trace of my boot partition. I've tracked this to vol_id not
> > recognizing an ext4 block device if the ext4 doesn't have a journal
> > (a feature that was added to ext4 as an afterthought for the flash
> > drive use case). The code in ext.c makes pretty clear why that happens,
> > it will only go into the ext3 branch if there is a journal in the
> > first place, and will only recognize ext4 as incompatible features
> > on top of ext3 in that branch.
> >
> > BTW, util-linux mount(8) apparently has the same issue, as it doesn't
> > autodetect an unjournaled ext4 and insists on "-t ext4" to mount it.

 Currently mount(8) depends on libblkid version from e2fsprogs. 
 
 The problem has been fixed in the upstream e2fsprogs tree, patches:

    a90f5391dda78f7bc4a8196a78355584ace0adf5
    1361821e7e248166f0740c832b164e6cd6b89de9

 You need to port the change to your Debian e2fsprogs package ...or
 wait for a new upstream release.

> No, libvolume_id does not support it.
> 
> Libvolume_id and blkid got merged and major parts got rewritten by
> Karel and we have a new libblkid in util-linux-ng now. We are on the
> way to switch udev over to it during the next month. Libvolume_id and
> vol_id will no longer be used and deleted from the udev tree.
> 
> If you like it detected now, you could provide a patch for it, but

 That's a trivial patch, see below (blkid version).

    Karel


commit be221b3a9d4b2a0be90d9c12ddb7f8ece568b2f9
Author: Eric Sandeen <sandeen@xxxxxxxxxx>
Date:   Mon Mar 9 12:17:17 2009 +0100

    blkid: recognize ext4(dev) without journal
    
    ext4/ext4dev no longer require a journal.
    
    w/o this blkid doesn't recognize after:
    
    We still must have one ext3-incompat-feature to flag
    as ext4(dev) so we shouldn't ever mis-recognize it.
    
    [kzak@xxxxxxxxxx: port from e2fsprogs to util-linux-ng tree]
    
    Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
    Signed-off-by: Theodore Ts'o <tytso@xxxxxxx>
    Signed-off-by: Karel Zak <kzak@xxxxxxxxxx>

diff --git a/libs/blkid/src/probers/ext.c b/libs/blkid/src/probers/ext.c
index ff0e51b..ca90f31 100644
--- a/libs/blkid/src/probers/ext.c
+++ b/libs/blkid/src/probers/ext.c
@@ -417,10 +417,6 @@ static int probe_ext4dev(blkid_probe pr, const struct blkid_idmag *mag)
 	if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
 		return -BLKID_ERR_PARAM;
 
-	/* ext4dev requires a journal */
-	if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
-		return -BLKID_ERR_PARAM;
-
 	/*
 	 * If the filesystem is marked as OK for use by in-development
 	 * filesystem code, but ext4dev is not supported, and ext4 is,
@@ -454,10 +450,6 @@ static int probe_ext4(blkid_probe pr, const struct blkid_idmag *mag)
 	if (fi & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV)
 		return -BLKID_ERR_PARAM;
 
-	/* ext4 requires journal */
-	if (!(fc & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
-		return -BLKID_ERR_PARAM;
-
 	/* Ext4 has at least one feature which ext3 doesn't understand */
 	if (!(frc & EXT3_FEATURE_RO_COMPAT_UNSUPPORTED) &&
 	    !(fi  & EXT3_FEATURE_INCOMPAT_UNSUPPORTED))
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [Linux DVB]     [Asterisk Internet PBX]     [DCCP]     [Netdev]     [X.org]     [Util Linux NG]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux