]>
Commit | Line | Data |
---|---|---|
7d777456 GKH |
1 | From 9a0bd6ee7ccc0cfdc614dbc6a4708d596ec53f82 Mon Sep 17 00:00:00 2001 |
2 | From: Christian Borntraeger <borntraeger@de.ibm.com> | |
3 | Date: Sun, 30 May 2010 22:49:47 -0400 | |
4 | Subject: ext4: allow defrag (EXT4_IOC_MOVE_EXT) in 32bit compat mode | |
5 | ||
6 | commit b684b2ee9409f2890a8b3aea98525bbe5f84e276 upstream (as of v2.6.34-git13) | |
7 | ||
8 | I have an x86_64 kernel with i386 userspace. e4defrag fails on the | |
9 | EXT4_IOC_MOVE_EXT ioctl because it is not wired up for the compat | |
10 | case. It seems that struct move_extent is compat save, only types | |
11 | with fixed widths are used: | |
12 | { | |
13 | __u32 reserved; /* should be zero */ | |
14 | __u32 donor_fd; /* donor file descriptor */ | |
15 | __u64 orig_start; /* logical start offset in block for orig */ | |
16 | __u64 donor_start; /* logical start offset in block for donor */ | |
17 | __u64 len; /* block length to be moved */ | |
18 | __u64 moved_len; /* moved block length */ | |
19 | }; | |
20 | ||
21 | Lets just wire up EXT4_IOC_MOVE_EXT for the compat case. | |
22 | ||
23 | Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> | |
24 | Signed-off-by: "Theodore Ts'o" <tytso@mit.edu> | |
25 | Reviewed-by: Eric Sandeen <sandeen@redhat.com> | |
26 | CC: Akira Fujita <a-fujita@rs.jp.nec.com> | |
27 | Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> | |
28 | --- | |
29 | fs/ext4/ioctl.c | 2 ++ | |
30 | 1 file changed, 2 insertions(+) | |
31 | ||
32 | --- a/fs/ext4/ioctl.c | |
33 | +++ b/fs/ext4/ioctl.c | |
34 | @@ -375,6 +375,8 @@ long ext4_compat_ioctl(struct file *file | |
35 | break; | |
36 | case EXT4_IOC_GROUP_ADD: | |
37 | break; | |
38 | + case EXT4_IOC_MOVE_EXT: | |
39 | + break; | |
40 | default: | |
41 | return -ENOIOCTLCMD; | |
42 | } |