Commit 8813587a authored by Theodore Ts'o's avatar Theodore Ts'o

Revert "ext4: consolidate checks for resize of bigalloc into ext4_resize_begin"

The function ext4_resize_begin() gets called from three different
places, and online resize for bigalloc file systems is disallowed from
the old-style online resize (EXT4_IOC_GROUP_ADD and
EXT4_IOC_GROUP_EXTEND), but it *is* supposed to be allowed via
EXT4_IOC_RESIZE_FS.

This reverts commit e9f9f61d.
parent 16aa4c9a
...@@ -692,6 +692,13 @@ static long ext4_ioctl_group_add(struct file *file, ...@@ -692,6 +692,13 @@ static long ext4_ioctl_group_add(struct file *file,
if (err) if (err)
return err; return err;
if (ext4_has_feature_bigalloc(sb)) {
ext4_msg(sb, KERN_ERR,
"Online resizing not supported with bigalloc");
err = -EOPNOTSUPP;
goto group_add_out;
}
err = mnt_want_write_file(file); err = mnt_want_write_file(file);
if (err) if (err)
goto group_add_out; goto group_add_out;
...@@ -914,6 +921,13 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) ...@@ -914,6 +921,13 @@ static long __ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
goto group_extend_out; goto group_extend_out;
} }
if (ext4_has_feature_bigalloc(sb)) {
ext4_msg(sb, KERN_ERR,
"Online resizing not supported with bigalloc");
err = -EOPNOTSUPP;
goto group_extend_out;
}
err = mnt_want_write_file(filp); err = mnt_want_write_file(filp);
if (err) if (err)
goto group_extend_out; goto group_extend_out;
......
...@@ -74,10 +74,6 @@ int ext4_resize_begin(struct super_block *sb) ...@@ -74,10 +74,6 @@ int ext4_resize_begin(struct super_block *sb)
return -EPERM; return -EPERM;
} }
if (ext4_has_feature_bigalloc(sb)) {
ext4_msg(sb, KERN_ERR, "Online resizing not supported with bigalloc");
return -EOPNOTSUPP;
}
if (ext4_has_feature_sparse_super2(sb)) { if (ext4_has_feature_sparse_super2(sb)) {
ext4_msg(sb, KERN_ERR, "Online resizing not supported with sparse_super2"); ext4_msg(sb, KERN_ERR, "Online resizing not supported with sparse_super2");
return -EOPNOTSUPP; return -EOPNOTSUPP;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment