Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2000 10:44:56 +0100 (MET)
From:      "Martin v.Loewis" <loewis@cs.tu-berlin.de>
To:        krentel@dreamscape.com
Cc:        freebsd-fs@FreeBSD.ORG, kwc@world.std.com
Subject:   Re: ext2fs optional features
Message-ID:  <200003250944.KAA29526@rubel.cs.tu-berlin.de>
In-Reply-To: <200003250310.WAA00537@dreamscape.com> (krentel@dreamscape.com)
References:   <200003250310.WAA00537@dreamscape.com>

next in thread | previous in thread | raw e-mail | index | archive | help
   What are the optional features?  What does "sparse_super" do?
   Does Linux actually use these features, or are they for future use?

Ext2 has three feature sets: compatible features, r/o compatible
features, and incompatible features. If an ext2 implementation sees a
volume that has a feature it does not recognize, it should act
accordingly: If the feature is compatible, go ahead an mount the
volume. If the feature is r/o compatible, refuse to mount r/w. If the
feature is incompatible, refuse to mount at all.

Currently (e2fstools 1.18), the following features are defined

#define EXT2_FEATURE_COMPAT_DIR_PREALLOC	0x0001
#define EXT2_FEATURE_COMPAT_IMAGIC_INODES		0x0002
#define EXT3_FEATURE_COMPAT_HAS_JOURNAL		0x0004

#define EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER	0x0001
#define EXT2_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
#define EXT2_FEATURE_RO_COMPAT_BTREE_DIR	0x0004

#define EXT2_FEATURE_INCOMPAT_COMPRESSION	0x0001
#define EXT2_FEATURE_INCOMPAT_FILETYPE	0x0002
#define EXT3_FEATURE_INCOMPAT_RECOVER	0x0004

The sparse_super option means that not every block group has a super
block, but only those that are powers of 3, 5, or 7, and block group
0. The feature is ro-compatible, since an implementation can mount the
file system when it finds a valid super block; it is not compatible,
since the implementation will overwrite data when it attempts to
write-back the super blocks into groups where none belong.

Of the features above, Linux 2.3.99pre2 supports the following ones:

#define EXT2_FEATURE_COMPAT_SUPP	0
#define EXT2_FEATURE_INCOMPAT_SUPP	EXT2_FEATURE_INCOMPAT_FILETYPE
#define EXT2_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
					 EXT2_FEATURE_RO_COMPAT_BTREE_DIR)

Whether these features are activated on a certain installation
primarily depends on the default settings that the distributor
(RedHat, Debian, ...) has selected.

Regards,
Martin



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-fs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003250944.KAA29526>