From owner-freebsd-fs Sat Mar 25 1:48:20 2000 Delivered-To: freebsd-fs@freebsd.org Received: from mail.cs.tu-berlin.de (mail.cs.tu-berlin.de [130.149.17.13]) by hub.freebsd.org (Postfix) with ESMTP id 3F5F537B6D1 for ; Sat, 25 Mar 2000 01:48:11 -0800 (PST) (envelope-from loewis@cs.tu-berlin.de) Received: from rubel.cs.tu-berlin.de (loewis@rubel.cs.tu-berlin.de [130.149.20.46]) by mail.cs.tu-berlin.de (8.9.3/8.9.3) with ESMTP id KAA00572; Sat, 25 Mar 2000 10:45:01 +0100 (MET) Received: (from loewis@localhost) by rubel.cs.tu-berlin.de (8.9.3/8.9.3) id KAA29526; Sat, 25 Mar 2000 10:44:56 +0100 (MET) Date: Sat, 25 Mar 2000 10:44:56 +0100 (MET) Message-Id: <200003250944.KAA29526@rubel.cs.tu-berlin.de> X-Authentication-Warning: rubel.cs.tu-berlin.de: loewis set sender to loewis@cs.tu-berlin.de using -f From: "Martin v.Loewis" To: krentel@dreamscape.com Cc: freebsd-fs@FreeBSD.ORG, kwc@world.std.com In-reply-to: <200003250310.WAA00537@dreamscape.com> (krentel@dreamscape.com) Subject: Re: ext2fs optional features References: <200003250310.WAA00537@dreamscape.com> Sender: owner-freebsd-fs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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