Date: Tue, 24 Oct 2006 02:10:25 GMT From: Bruce Evans <bde@zeta.org.au> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/104133: [ext2fs] EXT2FS module corrupts EXT2/3 filesystems Message-ID: <200610240210.k9O2APfC013884@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/104133; it has been noted by GNATS. From: Bruce Evans <bde@zeta.org.au> To: Bjoern Voigt <bjoern@cs.tu-berlin.de> Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: kern/104133: [ext2fs] EXT2FS module corrupts EXT2/3 filesystems Date: Tue, 24 Oct 2006 12:06:06 +1000 (EST) On Mon, 23 Oct 2006, Bjoern Voigt wrote: > But FreeBSD's ext2fs does not refuse to mount ext2 or ext3 file systems > with extended attributes (user_xattr). Mount does not show any errors or > warnings. Right, it was your task to find why it doesn't :-), but I think I figured that out: out > The information weather or not an ext2/3 file system contains extended > attributes or not can not be found in the output of dumpe2fs: > > # dumpe2fs /dev/hda6 > dumpe2fs 1.38 (30-Jun-2005) > ... > Filesystem features: has_journal filetype sparse_super This doesn't mention extended attributes. This seems to be a bug in dumpe2fs. The problem wth not disallowing mounts with extended attributes seems to be that extended attributes are supposed to be (always) backwards compatible (except to ext2fs version 0, which doesn't even have the features bitmaps) -- they are in the features bitmap for compatible attributes. FreeBSD's ext2fs only checks the features bitmaps for incompatible and read-only-compatible attributes. In the above, has_journal is supposed to be compatible, filetype is incompatible but supported by FreeBSD (i.e., it is incompatible with some implementations but not with FreeBSD's), and sparse_super is read-only compatible but supported by FreeBSD (i.e., it is always compatible for read-only mounts, and for read-write mounts it is incompatible with some implementations but not with FreeBSD's). Now your task is to figure out why has_journal and/or extended attributes are supposed to be compatible but aren't :-). I don't see how they can be read-write compatible. Linux-2.6.10's handling of the feature flags for them is simple: - journal: ext2fs just prints a warning if the journal feature bit is set. There is also an incompat journal feature. These are the only ext3 features known to ext2fs. - extended attributes: ext2fs's only handling of the feature bit for this is to force it to be set. Otherwise, it seems to just support extended attributes. Try using an ext3 file system that doesn't use extended attributes in any way, to see if FreeBSD's ext2fs creates bad extended attributes starting from non. e2fsck and/or tune2fs might be able to remove any existing extended attributes. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610240210.k9O2APfC013884>