Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 83982b6f authored by Theodore Ts'o's avatar Theodore Ts'o
Browse files

ext4: Remove "extents" mount option



This mount option is largely superfluous, and in fact the way it was
implemented was buggy; if a filesystem which did not have the extents
feature flag was mounted -o extents, the filesystem would attempt to
create and use extents-based file even though the extents feature flag
was not eabled.  The simplest thing to do is to nuke the mount option
entirely.  It's not all that useful to force the non-creation of new
extent-based files if the filesystem can support it.

Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 4d783b09
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -131,11 +131,6 @@ ro Mount filesystem read only. Note that ext4 will
                     	mount options "ro,noload" can be used to prevent
		     	writes to the filesystem.

extents		(*)	ext4 will use extents to address file data.  The
			file system will no longer be mountable by ext3.

noextents		ext4 will not use extents for newly created files

journal_checksum	Enable checksumming of the journal transactions.
			This will allow the recovery code in e2fsck and the
			kernel to detect corruption in the kernel.  It is a
+0 −1
Original line number Diff line number Diff line
@@ -536,7 +536,6 @@ do { \
#define EXT4_MOUNT_QUOTA		0x80000 /* Some quota option set */
#define EXT4_MOUNT_USRQUOTA		0x100000 /* "old" user quota */
#define EXT4_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
#define EXT4_MOUNT_EXTENTS		0x400000 /* Extents support */
#define EXT4_MOUNT_JOURNAL_CHECKSUM	0x800000 /* Journal checksums */
#define EXT4_MOUNT_JOURNAL_ASYNC_COMMIT	0x1000000 /* Journal Async Commit */
#define EXT4_MOUNT_I_VERSION            0x2000000 /* i_version support */
+2 −2
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@

#define EXT4_SINGLEDATA_TRANS_BLOCKS(sb)				\
	(EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)   \
		|| test_opt(sb, EXTENTS) ? 27U : 8U)
	 ? 27U : 8U)

/* Extended attribute operations touch at most two data buffers,
 * two bitmap buffers, and two group summaries, in addition to the inode
+2 −2
Original line number Diff line number Diff line
@@ -2247,7 +2247,7 @@ void ext4_ext_init(struct super_block *sb)
	 * possible initialization would be here
	 */

	if (test_opt(sb, EXTENTS)) {
	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
		printk(KERN_INFO "EXT4-fs: file extents enabled");
#ifdef AGGRESSIVE_TEST
		printk(", aggressive tests");
@@ -2272,7 +2272,7 @@ void ext4_ext_init(struct super_block *sb)
 */
void ext4_ext_release(struct super_block *sb)
{
	if (!test_opt(sb, EXTENTS))
	if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
		return;

#ifdef EXTENTS_STATS
+1 −1
Original line number Diff line number Diff line
@@ -917,7 +917,7 @@ got:
	if (err)
		goto fail_free_drop;

	if (test_opt(sb, EXTENTS)) {
	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
		/* set extent flag only for directory, file and normal symlink*/
		if (S_ISDIR(mode) || S_ISREG(mode) || S_ISLNK(mode)) {
			EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
Loading