aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/ioctl.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-10-10 09:40:52 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-10-10 09:40:52 -0400
commitc2ea3fde61f1df1dbf062345f23277dcd6f01dfe (patch)
tree53ecbf57416326810540494e814c05753bf30874 /fs/ext4/ioctl.c
parent240799cdf22bd789ea6852653c3b879d35ad0a6c (diff)
ext4: Remove old legacy block allocator
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r--fs/ext4/ioctl.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
index 3e14060b398..ea27eaa0cfe 100644
--- a/fs/ext4/ioctl.c
+++ b/fs/ext4/ioctl.c
@@ -23,7 +23,6 @@ long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
23 struct inode *inode = filp->f_dentry->d_inode; 23 struct inode *inode = filp->f_dentry->d_inode;
24 struct ext4_inode_info *ei = EXT4_I(inode); 24 struct ext4_inode_info *ei = EXT4_I(inode);
25 unsigned int flags; 25 unsigned int flags;
26 unsigned short rsv_window_size;
27 26
28 ext4_debug("cmd = %u, arg = %lu\n", cmd, arg); 27 ext4_debug("cmd = %u, arg = %lu\n", cmd, arg);
29 28
@@ -190,49 +189,6 @@ setversion_out:
190 return ret; 189 return ret;
191 } 190 }
192#endif 191#endif
193 case EXT4_IOC_GETRSVSZ:
194 if (test_opt(inode->i_sb, RESERVATION)
195 && S_ISREG(inode->i_mode)
196 && ei->i_block_alloc_info) {
197 rsv_window_size = ei->i_block_alloc_info->rsv_window_node.rsv_goal_size;
198 return put_user(rsv_window_size, (int __user *)arg);
199 }
200 return -ENOTTY;
201 case EXT4_IOC_SETRSVSZ: {
202 int err;
203
204 if (!test_opt(inode->i_sb, RESERVATION) || !S_ISREG(inode->i_mode))
205 return -ENOTTY;
206
207 if (!is_owner_or_cap(inode))
208 return -EACCES;
209
210 if (get_user(rsv_window_size, (int __user *)arg))
211 return -EFAULT;
212
213 err = mnt_want_write(filp->f_path.mnt);
214 if (err)
215 return err;
216
217 if (rsv_window_size > EXT4_MAX_RESERVE_BLOCKS)
218 rsv_window_size = EXT4_MAX_RESERVE_BLOCKS;
219
220 /*
221 * need to allocate reservation structure for this inode
222 * before set the window size
223 */
224 down_write(&ei->i_data_sem);
225 if (!ei->i_block_alloc_info)
226 ext4_init_block_alloc_info(inode);
227
228 if (ei->i_block_alloc_info){
229 struct ext4_reserve_window_node *rsv = &ei->i_block_alloc_info->rsv_window_node;
230 rsv->rsv_goal_size = rsv_window_size;
231 }
232 up_write(&ei->i_data_sem);
233 mnt_drop_write(filp->f_path.mnt);
234 return 0;
235 }
236 case EXT4_IOC_GROUP_EXTEND: { 192 case EXT4_IOC_GROUP_EXTEND: {
237 ext4_fsblk_t n_blocks_count; 193 ext4_fsblk_t n_blocks_count;
238 struct super_block *sb = inode->i_sb; 194 struct super_block *sb = inode->i_sb;