Skip to content

Commit 01f795f

Browse files
xiaoqiangnktytso
authored andcommitted
ext4: add online resizing support for meta_bg and 64-bit file systems
This patch adds support for resizing file systems with the meta_bg and 64bit features. [ Added a fix by tytso to fix a divide by zero when resizing a filesystem from 14 TB to 18TB. Also fixed overhead accounting for meta_bg file systems.] Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent 28623c2 commit 01f795f

File tree

2 files changed

+165
-65
lines changed

2 files changed

+165
-65
lines changed

fs/ext4/ioctl.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -365,26 +365,11 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
365365
return -EOPNOTSUPP;
366366
}
367367

368-
if (EXT4_HAS_INCOMPAT_FEATURE(sb,
369-
EXT4_FEATURE_INCOMPAT_META_BG)) {
370-
ext4_msg(sb, KERN_ERR,
371-
"Online resizing not (yet) supported with meta_bg");
372-
return -EOPNOTSUPP;
373-
}
374-
375368
if (copy_from_user(&n_blocks_count, (__u64 __user *)arg,
376369
sizeof(__u64))) {
377370
return -EFAULT;
378371
}
379372

380-
if (n_blocks_count > MAX_32_NUM &&
381-
!EXT4_HAS_INCOMPAT_FEATURE(sb,
382-
EXT4_FEATURE_INCOMPAT_64BIT)) {
383-
ext4_msg(sb, KERN_ERR,
384-
"File system only supports 32-bit block numbers");
385-
return -EOPNOTSUPP;
386-
}
387-
388373
err = ext4_resize_begin(sb);
389374
if (err)
390375
return err;

0 commit comments

Comments
 (0)