aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
authorYongqiang Yang <xiaoqiangnk@gmail.com>2012-09-05 01:33:50 -0400
committerTheodore Ts'o <tytso@mit.edu>2012-09-05 01:33:50 -0400
commit01f795f9e0d67adeccc61a8b20c28acb45fa5fd8 (patch)
tree3a253e174e01279eb5040565fb75402d835b0759 /fs/ext4/ioctl.c
parent28623c2f5b0dca3c3ea34fd6108940661352e276 (diff)
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>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 7f7dad787603..8b84fe28ccaf 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -365,26 +365,11 @@ group_add_out:
365 return -EOPNOTSUPP; 365 return -EOPNOTSUPP;
366 } 366 }
367 367
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
375 if (copy_from_user(&n_blocks_count, (__u64 __user *)arg, 368 if (copy_from_user(&n_blocks_count, (__u64 __user *)arg,
376 sizeof(__u64))) { 369 sizeof(__u64))) {
377 return -EFAULT; 370 return -EFAULT;
378 } 371 }
379 372
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
388 err = ext4_resize_begin(sb); 373 err = ext4_resize_begin(sb);
389 if (err) 374 if (err)
390 return err; 375 return err;