ioctl.c (9f30a04d768f64280dc0c40b730746e82f298d88) | ioctl.c (e2b911c53584a92266943f3b7f2cdbc19c1a4e80) |
---|---|
1/* 2 * linux/fs/ext4/ioctl.c 3 * 4 * Copyright (C) 1993, 1994, 1995 5 * Remy Card (card@masi.ibp.fr) 6 * Laboratoire MASI - Institut Blaise Pascal 7 * Universite Pierre et Marie Curie (Paris VI) 8 */ --- 131 unchanged lines hidden (view full) --- 140 set_nlink(inode_bl, 1); 141 i_uid_write(inode_bl, 0); 142 i_gid_write(inode_bl, 0); 143 inode_bl->i_flags = 0; 144 ei_bl->i_flags = 0; 145 inode_bl->i_version = 1; 146 i_size_write(inode_bl, 0); 147 inode_bl->i_mode = S_IFREG; | 1/* 2 * linux/fs/ext4/ioctl.c 3 * 4 * Copyright (C) 1993, 1994, 1995 5 * Remy Card (card@masi.ibp.fr) 6 * Laboratoire MASI - Institut Blaise Pascal 7 * Universite Pierre et Marie Curie (Paris VI) 8 */ --- 131 unchanged lines hidden (view full) --- 140 set_nlink(inode_bl, 1); 141 i_uid_write(inode_bl, 0); 142 i_gid_write(inode_bl, 0); 143 inode_bl->i_flags = 0; 144 ei_bl->i_flags = 0; 145 inode_bl->i_version = 1; 146 i_size_write(inode_bl, 0); 147 inode_bl->i_mode = S_IFREG; |
148 if (EXT4_HAS_INCOMPAT_FEATURE(sb, 149 EXT4_FEATURE_INCOMPAT_EXTENTS)) { | 148 if (ext4_has_feature_extents(sb)) { |
150 ext4_set_inode_flag(inode_bl, EXT4_INODE_EXTENTS); 151 ext4_ext_tree_init(handle, inode_bl); 152 } else 153 memset(ei_bl->i_data, 0, sizeof(ei_bl->i_data)); 154 } 155 156 swap_inode_data(inode, inode_bl); 157 --- 220 unchanged lines hidden (view full) --- 378 if (err) 379 return err; 380 381 if (get_user(n_blocks_count, (__u32 __user *)arg)) { 382 err = -EFAULT; 383 goto group_extend_out; 384 } 385 | 149 ext4_set_inode_flag(inode_bl, EXT4_INODE_EXTENTS); 150 ext4_ext_tree_init(handle, inode_bl); 151 } else 152 memset(ei_bl->i_data, 0, sizeof(ei_bl->i_data)); 153 } 154 155 swap_inode_data(inode, inode_bl); 156 --- 220 unchanged lines hidden (view full) --- 377 if (err) 378 return err; 379 380 if (get_user(n_blocks_count, (__u32 __user *)arg)) { 381 err = -EFAULT; 382 goto group_extend_out; 383 } 384 |
386 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, 387 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { | 385 if (ext4_has_feature_bigalloc(sb)) { |
388 ext4_msg(sb, KERN_ERR, 389 "Online resizing not supported with bigalloc"); 390 err = -EOPNOTSUPP; 391 goto group_extend_out; 392 } 393 394 err = mnt_want_write_file(filp); 395 if (err) --- 31 unchanged lines hidden (view full) --- 427 if (!donor.file) 428 return -EBADF; 429 430 if (!(donor.file->f_mode & FMODE_WRITE)) { 431 err = -EBADF; 432 goto mext_out; 433 } 434 | 386 ext4_msg(sb, KERN_ERR, 387 "Online resizing not supported with bigalloc"); 388 err = -EOPNOTSUPP; 389 goto group_extend_out; 390 } 391 392 err = mnt_want_write_file(filp); 393 if (err) --- 31 unchanged lines hidden (view full) --- 425 if (!donor.file) 426 return -EBADF; 427 428 if (!(donor.file->f_mode & FMODE_WRITE)) { 429 err = -EBADF; 430 goto mext_out; 431 } 432 |
435 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, 436 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { | 433 if (ext4_has_feature_bigalloc(sb)) { |
437 ext4_msg(sb, KERN_ERR, 438 "Online defrag not supported with bigalloc"); 439 err = -EOPNOTSUPP; 440 goto mext_out; 441 } 442 443 err = mnt_want_write_file(filp); 444 if (err) --- 20 unchanged lines hidden (view full) --- 465 return err; 466 467 if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg, 468 sizeof(input))) { 469 err = -EFAULT; 470 goto group_add_out; 471 } 472 | 434 ext4_msg(sb, KERN_ERR, 435 "Online defrag not supported with bigalloc"); 436 err = -EOPNOTSUPP; 437 goto mext_out; 438 } 439 440 err = mnt_want_write_file(filp); 441 if (err) --- 20 unchanged lines hidden (view full) --- 462 return err; 463 464 if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg, 465 sizeof(input))) { 466 err = -EFAULT; 467 goto group_add_out; 468 } 469 |
473 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, 474 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { | 470 if (ext4_has_feature_bigalloc(sb)) { |
475 ext4_msg(sb, KERN_ERR, 476 "Online resizing not supported with bigalloc"); 477 err = -EOPNOTSUPP; 478 goto group_add_out; 479 } 480 481 err = mnt_want_write_file(filp); 482 if (err) --- 65 unchanged lines hidden (view full) --- 548 return err; 549 } 550 551 case EXT4_IOC_RESIZE_FS: { 552 ext4_fsblk_t n_blocks_count; 553 int err = 0, err2 = 0; 554 ext4_group_t o_group = EXT4_SB(sb)->s_groups_count; 555 | 471 ext4_msg(sb, KERN_ERR, 472 "Online resizing not supported with bigalloc"); 473 err = -EOPNOTSUPP; 474 goto group_add_out; 475 } 476 477 err = mnt_want_write_file(filp); 478 if (err) --- 65 unchanged lines hidden (view full) --- 544 return err; 545 } 546 547 case EXT4_IOC_RESIZE_FS: { 548 ext4_fsblk_t n_blocks_count; 549 int err = 0, err2 = 0; 550 ext4_group_t o_group = EXT4_SB(sb)->s_groups_count; 551 |
556 if (EXT4_HAS_RO_COMPAT_FEATURE(sb, 557 EXT4_FEATURE_RO_COMPAT_BIGALLOC)) { | 552 if (ext4_has_feature_bigalloc(sb)) { |
558 ext4_msg(sb, KERN_ERR, 559 "Online resizing not (yet) supported with bigalloc"); 560 return -EOPNOTSUPP; 561 } 562 563 if (copy_from_user(&n_blocks_count, (__u64 __user *)arg, 564 sizeof(__u64))) { 565 return -EFAULT; --- 204 unchanged lines hidden --- | 553 ext4_msg(sb, KERN_ERR, 554 "Online resizing not (yet) supported with bigalloc"); 555 return -EOPNOTSUPP; 556 } 557 558 if (copy_from_user(&n_blocks_count, (__u64 __user *)arg, 559 sizeof(__u64))) { 560 return -EFAULT; --- 204 unchanged lines hidden --- |