diff options
author | Theodore Ts'o | 2009-01-06 14:53:16 -0500 |
---|---|---|
committer | Theodore Ts'o | 2009-01-06 14:53:16 -0500 |
commit | 83982b6f47201c4c7767210d24d7d8c99567a0b3 (patch) | |
tree | f1c19b1c6b5a34dd0c5de7519b78414b7a9267ee /fs/ext4/migrate.c | |
parent | 4d783b093cd4f3e2738527365979cbd1c5101065 (diff) |
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: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/migrate.c')
-rw-r--r-- | fs/ext4/migrate.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/ext4/migrate.c b/fs/ext4/migrate.c index e7cd488da4bb..734abca25e35 100644 --- a/fs/ext4/migrate.c +++ b/fs/ext4/migrate.c @@ -459,13 +459,13 @@ int ext4_ext_migrate(struct inode *inode) struct list_blocks_struct lb; unsigned long max_entries; - if (!test_opt(inode->i_sb, EXTENTS)) - /* - * if mounted with noextents we don't allow the migrate - */ - return -EINVAL; - - if ((EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) + /* + * If the filesystem does not support extents, or the inode + * already is extent-based, error out. + */ + if (!EXT4_HAS_INCOMPAT_FEATURE(inode->i_sb, + EXT4_FEATURE_INCOMPAT_EXTENTS) || + (EXT4_I(inode)->i_flags & EXT4_EXTENTS_FL)) return -EINVAL; if (S_ISLNK(inode->i_mode) && inode->i_blocks == 0) |