Skip to contentSkip to conversation

ext4: do not enable delalloc by default for ext2

PATCH Applied Brian Foster 3 participants 5 messages Mar 27, 2012 – Sep 18, 2012 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: do not enable delalloc by default for ext2

Use traditional ext2 mount options. Do not enable delalloc by default for ext2.

---
 fs/ext4/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/super.c +1 -1
index 9339009..b08a547 100644
@@ -3229,7 +3229,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	 * enable delayed allocation by default
 	 * Use -o nodelalloc to turn it off
 	 */
-	if (!IS_EXT3_SB(sb) &&
+	if (!IS_EXT3_SB(sb) && !IS_EXT2_SB(sb) &&
 	    ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
 		set_opt(sb, DELALLOC);
 
Signature · 1 line
1.7.7.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Brian Foster

Use traditional ext2 mount options. Do not enable delalloc by default for ext2.

This makes sense to me, I think.

It was done for ext3 to semi-preserve the journal "5s sync" I think, and one could argue that delalloc is ok for ext2, but it seems like people would expect behavior which is as close to what ext2.ko provided as possible. So,

Quoted 18 lines
---
 fs/ext4/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/super.c +1 -1
index 9339009..b08a547 100644
@@ -3229,7 +3229,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	 * enable delayed allocation by default
 	 * Use -o nodelalloc to turn it off
 	 */
-	if (!IS_EXT3_SB(sb) &&
+	if (!IS_EXT3_SB(sb) && !IS_EXT2_SB(sb) &&
 	    ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
 		set_opt(sb, DELALLOC);
 
#2 lore raw
In reply to Brian Foster
Quoted 13 lines · Brian Foster

Use traditional ext2 mount options. Do not enable delalloc by default for ext2.

---
 fs/ext4/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ext4/super.c +0 -0
index 9339009..b08a547 100644

fs/ext4/super.c static int ext4_fill_super(struct super_block *sb, void *data, int silent) · line 3235

Quoted 8 lines
fs/ext4/super.c +1 -1
@@ -3229,7 +3229,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	 * enable delayed allocation by default
 	 * Use -o nodelalloc to turn it off
 	 */
-	if (!IS_EXT3_SB(sb) &&
+	if (!IS_EXT3_SB(sb) && !IS_EXT2_SB(sb) &&
 	    ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
 		set_opt(sb, DELALLOC);
 

Ping... Any comments on this? Thanks.

Brian

#3 lore raw
Quoted 8 lines · Brian Foster
Quoted 7 lines · Brian Foster

Use traditional ext2 mount options. Do not enable delalloc by default for ext2.

---
 fs/ext4/super.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 16 lines
Quoted 6 lines
fs/ext4/super.c +0 -0
index 9339009..b08a547 100644

fs/ext4/super.c static int ext4_fill_super(struct super_block *sb, void *data, int silent) · line 3235

Quoted 8 lines
fs/ext4/super.c +1 -1
@@ -3229,7 +3229,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
 	 * enable delayed allocation by default
 	 * Use -o nodelalloc to turn it off
 	 */
-	if (!IS_EXT3_SB(sb) &&
+	if (!IS_EXT3_SB(sb) && !IS_EXT2_SB(sb) &&
 	    ((def_mount_opts & EXT4_DEFM_NODELALLOC) == 0))
 		set_opt(sb, DELALLOC);
 

Ping... Any comments on this? Thanks.

Ping again?

Ted, this has my reviewed-by, I think it really makes sense to push in to keep ext2 behavior close to the same as it was in ext2.ko.

Thanks,
-Eric

Quoted 6 lines

Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html