Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 101124
b: refs/heads/master
c: e4079a1
h: refs/heads/master
v: v3
  • Loading branch information
Eric Sandeen authored and Theodore Ts'o committed Jul 11, 2008
1 parent 54f6838 commit 997cf9c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c07651b556323e0e763c452587fe29d2b034b314
refs/heads/master: e4079a11f5ed966b7d972cc69e8d337a0f095e32
6 changes: 1 addition & 5 deletions trunk/fs/ext4/ialloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,14 +836,10 @@ struct inode *ext4_new_inode(handle_t *handle, struct inode * dir, int mode)
goto fail_free_drop;

if (test_opt(sb, EXTENTS)) {
/* set extent flag only for diretory, file and normal symlink*/
/* 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;
ext4_ext_tree_init(handle, inode);
err = ext4_update_incompat_feature(handle, sb,
EXT4_FEATURE_INCOMPAT_EXTENTS);
if (err)
goto fail_free_drop;
}
}

Expand Down
21 changes: 17 additions & 4 deletions trunk/fs/ext4/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,13 @@ static int parse_options (char *options, struct super_block *sb,
clear_opt(sbi->s_mount_opt, NOBH);
break;
case Opt_extents:
if (!EXT4_HAS_INCOMPAT_FEATURE(sb,
EXT4_FEATURE_INCOMPAT_EXTENTS)) {
ext4_warning(sb, __func__,
"extents feature not enabled "
"on this filesystem, use tune2fs\n");
return 0;
}
set_opt (sbi->s_mount_opt, EXTENTS);
break;
case Opt_noextents:
Expand Down Expand Up @@ -1997,12 +2004,18 @@ static int ext4_fill_super (struct super_block *sb, void *data, int silent)

/*
* turn on extents feature by default in ext4 filesystem
* User -o noextents to turn it off
* only if feature flag already set by mkfs or tune2fs.
* Use -o noextents to turn it off
*/
set_opt(sbi->s_mount_opt, EXTENTS);
if (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_EXTENTS))
set_opt(sbi->s_mount_opt, EXTENTS);
else
ext4_warning(sb, __func__,
"extents feature not enabled on this filesystem, "
"use tune2fs.\n");
/*
* turn on mballoc feature by default in ext4 filesystem
* User -o nomballoc to turn it off
* turn on mballoc code by default in ext4 filesystem
* Use -o nomballoc to turn it off
*/
set_opt(sbi->s_mount_opt, MBALLOC);

Expand Down

0 comments on commit 997cf9c

Please sign in to comment.