Skip to content

Commit 02ea210

Browse files
Mingming CaoLinus Torvalds
authored andcommitted
[PATCH] ext4: enable building of ext4
Originally part of a patch from Mingming Cao and Randy Dunlap. Reorganized by Shaggy. Signed-off-by: Randy Dunlap <[email protected]> Signed-off-by: Mingming Cao<[email protected]> Signed-off-by: Dave Kleikamp <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 617ba13 commit 02ea210

File tree

3 files changed

+73
-4
lines changed

3 files changed

+73
-4
lines changed

fs/Kconfig

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,73 @@ config EXT3_FS_SECURITY
140140
If you are not using a security module that requires using
141141
extended attributes for file security labels, say N.
142142

143+
config EXT4DEV_FS
144+
tristate "Ext4dev/ext4 extended fs support development (EXPERIMENTAL)"
145+
depends on EXPERIMENTAL
146+
select JBD
147+
help
148+
Ext4dev is a predecessor filesystem of the next generation
149+
extended fs ext4, based on ext3 filesystem code. It will be
150+
renamed ext4 fs later, once ext4dev is mature and stabilized.
151+
152+
Unlike the change from ext2 filesystem to ext3 filesystem,
153+
the on-disk format of ext4dev is not the same as ext3 any more:
154+
it is based on extent maps and it supports 48-bit physical block
155+
numbers. These combined on-disk format changes will allow
156+
ext4dev/ext4 to handle more than 16 TB filesystem volumes --
157+
a hard limit that ext3 cannot overcome without changing the
158+
on-disk format.
159+
160+
Other than extent maps and 48-bit block numbers, ext4dev also is
161+
likely to have other new features such as persistent preallocation,
162+
high resolution time stamps, and larger file support etc. These
163+
features will be added to ext4dev gradually.
164+
165+
To compile this file system support as a module, choose M here. The
166+
module will be called ext4dev. Be aware, however, that the filesystem
167+
of your root partition (the one containing the directory /) cannot
168+
be compiled as a module, and so this could be dangerous.
169+
170+
If unsure, say N.
171+
172+
config EXT4DEV_FS_XATTR
173+
bool "Ext4dev extended attributes"
174+
depends on EXT4DEV_FS
175+
default y
176+
help
177+
Extended attributes are name:value pairs associated with inodes by
178+
the kernel or by users (see the attr(5) manual page, or visit
179+
<http://acl.bestbits.at/> for details).
180+
181+
If unsure, say N.
182+
183+
You need this for POSIX ACL support on ext4dev/ext4.
184+
185+
config EXT4DEV_FS_POSIX_ACL
186+
bool "Ext4dev POSIX Access Control Lists"
187+
depends on EXT4DEV_FS_XATTR
188+
select FS_POSIX_ACL
189+
help
190+
POSIX Access Control Lists (ACLs) support permissions for users and
191+
groups beyond the owner/group/world scheme.
192+
193+
To learn more about Access Control Lists, visit the POSIX ACLs for
194+
Linux website <http://acl.bestbits.at/>.
195+
196+
If you don't know what Access Control Lists are, say N
197+
198+
config EXT4DEV_FS_SECURITY
199+
bool "Ext4dev Security Labels"
200+
depends on EXT4DEV_FS_XATTR
201+
help
202+
Security labels support alternative access control models
203+
implemented by security modules like SELinux. This option
204+
enables an extended attribute handler for file security
205+
labels in the ext4dev/ext4 filesystem.
206+
207+
If you are not using a security module that requires using
208+
extended attributes for file security labels, say N.
209+
143210
config JBD
144211
tristate
145212
help
@@ -173,11 +240,11 @@ config JBD_DEBUG
173240
"echo 0 > /proc/sys/fs/jbd-debug".
174241

175242
config FS_MBCACHE
176-
# Meta block cache for Extended Attributes (ext2/ext3)
243+
# Meta block cache for Extended Attributes (ext2/ext3/ext4)
177244
tristate
178-
depends on EXT2_FS_XATTR || EXT3_FS_XATTR
179-
default y if EXT2_FS=y || EXT3_FS=y
180-
default m if EXT2_FS=m || EXT3_FS=m
245+
depends on EXT2_FS_XATTR || EXT3_FS_XATTR || EXT4DEV_FS_XATTR
246+
default y if EXT2_FS=y || EXT3_FS=y || EXT4DEV_FS=y
247+
default m if EXT2_FS=m || EXT3_FS=m || EXT4DEV_FS=m
181248

182249
config REISERFS_FS
183250
tristate "Reiserfs support"

fs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ obj-$(CONFIG_DLM) += dlm/
6262
# Do not add any filesystems before this line
6363
obj-$(CONFIG_REISERFS_FS) += reiserfs/
6464
obj-$(CONFIG_EXT3_FS) += ext3/ # Before ext2 so root fs can be ext3
65+
obj-$(CONFIG_EXT4DEV_FS) += ext4/ # Before ext2 so root fs can be ext4dev
6566
obj-$(CONFIG_JBD) += jbd/
6667
obj-$(CONFIG_EXT2_FS) += ext2/
6768
obj-$(CONFIG_CRAMFS) += cramfs/

include/linux/magic.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#define EFS_SUPER_MAGIC 0x414A53
99
#define EXT2_SUPER_MAGIC 0xEF53
1010
#define EXT3_SUPER_MAGIC 0xEF53
11+
#define EXT4_SUPER_MAGIC 0xEF53
1112
#define HPFS_SUPER_MAGIC 0xf995e849
1213
#define ISOFS_SUPER_MAGIC 0x9660
1314
#define JFFS2_SUPER_MAGIC 0x72b6

0 commit comments

Comments
 (0)