public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@austin.ibm.com>
To: Theodore Tso <tytso@mit.edu>
Cc: Andrew Morton <akpm@osdl.org>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: [PATCH] Get rid of extents mount option - try 2
Date: Fri, 06 Oct 2006 16:21:40 -0500	[thread overview]
Message-ID: <1160169700.8658.56.camel@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <1160169015.8658.50.camel@kleikamp.austin.ibm.com>

I rushed that out too quick.  This one cleans up the header files too.

EXT4: Get rid of extents mount option

Enabling an ext4 file system to use extents should be done with
'tune2fs -O extents' or 'mke2fs -O extents', not with a mount option

Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>

diff -Nurp linux-orig/fs/ext4/extents.c linux/fs/ext4/extents.c
--- linux-orig/fs/ext4/extents.c	2006-10-05 07:39:08.000000000 -0500
+++ linux/fs/ext4/extents.c	2006-10-06 15:45:59.000000000 -0500
@@ -1875,7 +1875,7 @@ void ext4_ext_init(struct super_block *s
 	 * possible initialization would be here
 	 */
 
-	if (test_opt(sb, EXTENTS)) {
+	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
 		printk("EXT4-fs: file extents enabled");
 #ifdef AGRESSIVE_TEST
 		printk(", agressive tests");
@@ -1900,7 +1900,7 @@ void ext4_ext_init(struct super_block *s
  */
 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
diff -Nurp linux-orig/fs/ext4/ialloc.c linux/fs/ext4/ialloc.c
--- linux-orig/fs/ext4/ialloc.c	2006-10-05 07:39:08.000000000 -0500
+++ linux/fs/ext4/ialloc.c	2006-10-06 15:37:36.000000000 -0500
@@ -618,16 +618,9 @@ got:
 		ext4_std_error(sb, err);
 		goto fail_free_drop;
 	}
-	if (test_opt(sb, EXTENTS)) {
+	if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
 		EXT4_I(inode)->i_flags |= EXT4_EXTENTS_FL;
 		ext4_ext_tree_init(handle, inode);
-		if (!EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS)) {
-			err = ext4_journal_get_write_access(handle, EXT4_SB(sb)->s_sbh);
-			if (err) goto fail;
-			EXT4_SET_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS);
-			BUFFER_TRACE(EXT4_SB(sb)->s_sbh, "call ext4_journal_dirty_metadata");
-			err = ext4_journal_dirty_metadata(handle, EXT4_SB(sb)->s_sbh);
-		}
 	}
 
 	ext4_debug("allocating inode %lu\n", inode->i_ino);
diff -Nurp linux-orig/fs/ext4/super.c linux/fs/ext4/super.c
--- linux-orig/fs/ext4/super.c	2006-10-05 07:39:08.000000000 -0500
+++ linux/fs/ext4/super.c	2006-10-06 15:47:47.000000000 -0500
@@ -728,7 +728,7 @@ enum {
 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
-	Opt_grpquota, Opt_extents,
+	Opt_grpquota,
 };
 
 static match_table_t tokens = {
@@ -778,7 +778,6 @@ static match_table_t tokens = {
 	{Opt_quota, "quota"},
 	{Opt_usrquota, "usrquota"},
 	{Opt_barrier, "barrier=%u"},
-	{Opt_extents, "extents"},
 	{Opt_err, NULL},
 	{Opt_resize, "resize"},
 };
@@ -1111,9 +1110,6 @@ clear_qf_name:
 		case Opt_bh:
 			clear_opt(sbi->s_mount_opt, NOBH);
 			break;
-		case Opt_extents:
-			set_opt (sbi->s_mount_opt, EXTENTS);
-			break;
 		default:
 			printk (KERN_ERR
 				"EXT4-fs: Unrecognized mount option \"%s\" "
diff -Nurp linux-orig/include/linux/ext4_fs.h linux/include/linux/ext4_fs.h
--- linux-orig/include/linux/ext4_fs.h	2006-10-05 07:39:08.000000000 -0500
+++ linux/include/linux/ext4_fs.h	2006-10-06 16:13:07.000000000 -0500
@@ -399,7 +399,6 @@ struct ext4_inode {
 #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 */
 
 /* Compatibility, for having both ext2_fs.h and ext4_fs.h included at once */
 #ifndef _LINUX_EXT2_FS_H
diff -Nurp linux-orig/include/linux/ext4_jbd2.h linux/include/linux/ext4_jbd2.h
--- linux-orig/include/linux/ext4_jbd2.h	2006-10-05 07:39:08.000000000 -0500
+++ linux/include/linux/ext4_jbd2.h	2006-10-06 16:17:20.000000000 -0500
@@ -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

-- 
David Kleikamp
IBM Linux Technology Center


  reply	other threads:[~2006-10-06 21:21 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-05 18:23 Updated ext4/jbd2 patches based on 2.6.19-rc1 Dave Kleikamp
2006-10-05 20:19 ` Andrew Morton
2006-10-05 23:25   ` Linus Torvalds
2006-10-06 12:50     ` Dave Kleikamp
2006-10-06 16:11       ` Linus Torvalds
2006-10-05 21:59 ` Andrew Morton
2006-10-06  0:39 ` Andrew Morton
2006-10-10  6:29   ` Andrew Morton
2006-10-10  7:54     ` Suparna Bhattacharya
2006-10-10  8:14       ` Andrew Morton
2006-10-10 20:02         ` [RFC] [PATCH] Documentation/filesystems/ext4.txt Dave Kleikamp
2006-10-10 20:56           ` Andrew Morton
2006-10-11 17:03           ` Andreas Dilger
2006-10-12 14:18           ` Valerie Clement
2006-10-06  3:55 ` Updated ext4/jbd2 patches based on 2.6.19-rc1 Andrew Morton
2006-10-06  3:58   ` Andrew Morton
2006-10-06 10:34     ` Alex Tomas
2006-10-06  4:54   ` Randy Dunlap
2006-10-06  5:05     ` Andrew Morton
2006-10-06  5:53     ` Andreas Dilger
2006-10-06  6:04       ` Andrew Morton
2006-10-06  6:41         ` Andreas Dilger
2006-10-06  6:50           ` Andrew Morton
2006-10-06 10:31             ` Alex Tomas
2006-10-06 13:57               ` Andrew Morton
2006-10-07 20:09                 ` alex
2006-10-06  6:52           ` Suparna Bhattacharya
2006-10-06 12:21   ` Theodore Tso
2006-10-06 21:10     ` [PATCH] Get rid of extents mount option Dave Kleikamp
2006-10-06 21:21       ` Dave Kleikamp [this message]
2006-10-06 22:32         ` [PATCH] Get rid of extents mount option - try 2 Andrew Morton
2006-10-06 23:20           ` Dave Kleikamp
2006-10-07  4:14             ` Theodore Tso
2006-10-07 15:53               ` Dave Kleikamp
2006-10-07 17:20                 ` Theodore Tso
2006-10-07 19:45                   ` Alex Tomas
2006-10-07 19:57                   ` Andrew Morton
2006-10-10 18:48                   ` Dave Kleikamp
2006-10-10 21:07                     ` Theodore Tso
2006-10-10 21:18                       ` Andrew Morton
2006-10-11 17:16         ` Andreas Dilger
2006-10-06  4:31 ` Updated ext4/jbd2 patches based on 2.6.19-rc1 Andrew Morton
2006-10-06  5:58   ` Andreas Dilger
2006-10-06  6:10     ` Andrew Morton
2006-10-06  6:48       ` Andreas Dilger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1160169700.8658.56.camel@kleikamp.austin.ibm.com \
    --to=shaggy@austin.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox