diff options
-rw-r--r-- | fs/cifs/ioctl.c | 7 | ||||
-rw-r--r-- | fs/compat_ioctl.c | 15 | ||||
-rw-r--r-- | fs/hfsplus/hfsplus_fs.h | 8 | ||||
-rw-r--r-- | fs/hfsplus/ioctl.c | 17 | ||||
-rw-r--r-- | fs/jfs/ioctl.c | 15 | ||||
-rw-r--r-- | include/linux/ext2_fs.h | 64 | ||||
-rw-r--r-- | include/linux/ext3_fs.h | 20 | ||||
-rw-r--r-- | include/linux/fs.h | 39 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 28 |
9 files changed, 124 insertions, 89 deletions
diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index b0ea6687ab55..e34c7db00f6f 100644 --- a/fs/cifs/ioctl.c +++ b/fs/cifs/ioctl.c | |||
@@ -22,7 +22,6 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <linux/fs.h> | 24 | #include <linux/fs.h> |
25 | #include <linux/ext2_fs.h> | ||
26 | #include "cifspdu.h" | 25 | #include "cifspdu.h" |
27 | #include "cifsglob.h" | 26 | #include "cifsglob.h" |
28 | #include "cifsproto.h" | 27 | #include "cifsproto.h" |
@@ -74,7 +73,7 @@ int cifs_ioctl (struct inode * inode, struct file * filep, | |||
74 | } | 73 | } |
75 | break; | 74 | break; |
76 | #ifdef CONFIG_CIFS_POSIX | 75 | #ifdef CONFIG_CIFS_POSIX |
77 | case EXT2_IOC_GETFLAGS: | 76 | case FS_IOC_GETFLAGS: |
78 | if(CIFS_UNIX_EXTATTR_CAP & caps) { | 77 | if(CIFS_UNIX_EXTATTR_CAP & caps) { |
79 | if (pSMBFile == NULL) | 78 | if (pSMBFile == NULL) |
80 | break; | 79 | break; |
@@ -82,12 +81,12 @@ int cifs_ioctl (struct inode * inode, struct file * filep, | |||
82 | &ExtAttrBits, &ExtAttrMask); | 81 | &ExtAttrBits, &ExtAttrMask); |
83 | if(rc == 0) | 82 | if(rc == 0) |
84 | rc = put_user(ExtAttrBits & | 83 | rc = put_user(ExtAttrBits & |
85 | EXT2_FL_USER_VISIBLE, | 84 | FS_FL_USER_VISIBLE, |
86 | (int __user *)arg); | 85 | (int __user *)arg); |
87 | } | 86 | } |
88 | break; | 87 | break; |
89 | 88 | ||
90 | case EXT2_IOC_SETFLAGS: | 89 | case FS_IOC_SETFLAGS: |
91 | if(CIFS_UNIX_EXTATTR_CAP & caps) { | 90 | if(CIFS_UNIX_EXTATTR_CAP & caps) { |
92 | if(get_user(ExtAttrBits,(int __user *)arg)) { | 91 | if(get_user(ExtAttrBits,(int __user *)arg)) { |
93 | rc = -EFAULT; | 92 | rc = -EFAULT; |
diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c index 3b0cf7fbd95a..bd9c4f49d4e5 100644 --- a/fs/compat_ioctl.c +++ b/fs/compat_ioctl.c | |||
@@ -123,21 +123,6 @@ | |||
123 | #include <linux/dvb/video.h> | 123 | #include <linux/dvb/video.h> |
124 | #include <linux/lp.h> | 124 | #include <linux/lp.h> |
125 | 125 | ||
126 | /* Aiee. Someone does not find a difference between int and long */ | ||
127 | #define EXT2_IOC32_GETFLAGS _IOR('f', 1, int) | ||
128 | #define EXT2_IOC32_SETFLAGS _IOW('f', 2, int) | ||
129 | #define EXT3_IOC32_GETVERSION _IOR('f', 3, int) | ||
130 | #define EXT3_IOC32_SETVERSION _IOW('f', 4, int) | ||
131 | #define EXT3_IOC32_GETRSVSZ _IOR('f', 5, int) | ||
132 | #define EXT3_IOC32_SETRSVSZ _IOW('f', 6, int) | ||
133 | #define EXT3_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int) | ||
134 | #ifdef CONFIG_JBD_DEBUG | ||
135 | #define EXT3_IOC32_WAIT_FOR_READONLY _IOR('f', 99, int) | ||
136 | #endif | ||
137 | |||
138 | #define EXT2_IOC32_GETVERSION _IOR('v', 1, int) | ||
139 | #define EXT2_IOC32_SETVERSION _IOW('v', 2, int) | ||
140 | |||
141 | static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd, | 126 | static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd, |
142 | unsigned long arg, struct file *f) | 127 | unsigned long arg, struct file *f) |
143 | { | 128 | { |
diff --git a/fs/hfsplus/hfsplus_fs.h b/fs/hfsplus/hfsplus_fs.h index 8a1ca5ef7ada..3915635b4470 100644 --- a/fs/hfsplus/hfsplus_fs.h +++ b/fs/hfsplus/hfsplus_fs.h | |||
@@ -246,12 +246,8 @@ struct hfsplus_readdir_data { | |||
246 | 246 | ||
247 | /* ext2 ioctls (EXT2_IOC_GETFLAGS and EXT2_IOC_SETFLAGS) to support | 247 | /* ext2 ioctls (EXT2_IOC_GETFLAGS and EXT2_IOC_SETFLAGS) to support |
248 | * chattr/lsattr */ | 248 | * chattr/lsattr */ |
249 | #define HFSPLUS_IOC_EXT2_GETFLAGS _IOR('f', 1, long) | 249 | #define HFSPLUS_IOC_EXT2_GETFLAGS FS_IOC_GETFLAGS |
250 | #define HFSPLUS_IOC_EXT2_SETFLAGS _IOW('f', 2, long) | 250 | #define HFSPLUS_IOC_EXT2_SETFLAGS FS_IOC_SETFLAGS |
251 | |||
252 | #define EXT2_FLAG_IMMUTABLE 0x00000010 /* Immutable file */ | ||
253 | #define EXT2_FLAG_APPEND 0x00000020 /* writes to file may only append */ | ||
254 | #define EXT2_FLAG_NODUMP 0x00000040 /* do not dump file */ | ||
255 | 251 | ||
256 | 252 | ||
257 | /* | 253 | /* |
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c index 13cf848ac833..79fd10402ea3 100644 --- a/fs/hfsplus/ioctl.c +++ b/fs/hfsplus/ioctl.c | |||
@@ -28,11 +28,11 @@ int hfsplus_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
28 | case HFSPLUS_IOC_EXT2_GETFLAGS: | 28 | case HFSPLUS_IOC_EXT2_GETFLAGS: |
29 | flags = 0; | 29 | flags = 0; |
30 | if (HFSPLUS_I(inode).rootflags & HFSPLUS_FLG_IMMUTABLE) | 30 | if (HFSPLUS_I(inode).rootflags & HFSPLUS_FLG_IMMUTABLE) |
31 | flags |= EXT2_FLAG_IMMUTABLE; /* EXT2_IMMUTABLE_FL */ | 31 | flags |= FS_IMMUTABLE_FL; /* EXT2_IMMUTABLE_FL */ |
32 | if (HFSPLUS_I(inode).rootflags & HFSPLUS_FLG_APPEND) | 32 | if (HFSPLUS_I(inode).rootflags & HFSPLUS_FLG_APPEND) |
33 | flags |= EXT2_FLAG_APPEND; /* EXT2_APPEND_FL */ | 33 | flags |= FS_APPEND_FL; /* EXT2_APPEND_FL */ |
34 | if (HFSPLUS_I(inode).userflags & HFSPLUS_FLG_NODUMP) | 34 | if (HFSPLUS_I(inode).userflags & HFSPLUS_FLG_NODUMP) |
35 | flags |= EXT2_FLAG_NODUMP; /* EXT2_NODUMP_FL */ | 35 | flags |= FS_NODUMP_FL; /* EXT2_NODUMP_FL */ |
36 | return put_user(flags, (int __user *)arg); | 36 | return put_user(flags, (int __user *)arg); |
37 | case HFSPLUS_IOC_EXT2_SETFLAGS: { | 37 | case HFSPLUS_IOC_EXT2_SETFLAGS: { |
38 | if (IS_RDONLY(inode)) | 38 | if (IS_RDONLY(inode)) |
@@ -44,32 +44,31 @@ int hfsplus_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
44 | if (get_user(flags, (int __user *)arg)) | 44 | if (get_user(flags, (int __user *)arg)) |
45 | return -EFAULT; | 45 | return -EFAULT; |
46 | 46 | ||
47 | if (flags & (EXT2_FLAG_IMMUTABLE|EXT2_FLAG_APPEND) || | 47 | if (flags & (FS_IMMUTABLE_FL|FS_APPEND_FL) || |
48 | HFSPLUS_I(inode).rootflags & (HFSPLUS_FLG_IMMUTABLE|HFSPLUS_FLG_APPEND)) { | 48 | HFSPLUS_I(inode).rootflags & (HFSPLUS_FLG_IMMUTABLE|HFSPLUS_FLG_APPEND)) { |
49 | if (!capable(CAP_LINUX_IMMUTABLE)) | 49 | if (!capable(CAP_LINUX_IMMUTABLE)) |
50 | return -EPERM; | 50 | return -EPERM; |
51 | } | 51 | } |
52 | 52 | ||
53 | /* don't silently ignore unsupported ext2 flags */ | 53 | /* don't silently ignore unsupported ext2 flags */ |
54 | if (flags & ~(EXT2_FLAG_IMMUTABLE|EXT2_FLAG_APPEND| | 54 | if (flags & ~(FS_IMMUTABLE_FL|FS_APPEND_FL|FS_NODUMP_FL)) |
55 | EXT2_FLAG_NODUMP)) | ||
56 | return -EOPNOTSUPP; | 55 | return -EOPNOTSUPP; |
57 | 56 | ||
58 | if (flags & EXT2_FLAG_IMMUTABLE) { /* EXT2_IMMUTABLE_FL */ | 57 | if (flags & FS_IMMUTABLE_FL) { /* EXT2_IMMUTABLE_FL */ |
59 | inode->i_flags |= S_IMMUTABLE; | 58 | inode->i_flags |= S_IMMUTABLE; |
60 | HFSPLUS_I(inode).rootflags |= HFSPLUS_FLG_IMMUTABLE; | 59 | HFSPLUS_I(inode).rootflags |= HFSPLUS_FLG_IMMUTABLE; |
61 | } else { | 60 | } else { |
62 | inode->i_flags &= ~S_IMMUTABLE; | 61 | inode->i_flags &= ~S_IMMUTABLE; |
63 | HFSPLUS_I(inode).rootflags &= ~HFSPLUS_FLG_IMMUTABLE; | 62 | HFSPLUS_I(inode).rootflags &= ~HFSPLUS_FLG_IMMUTABLE; |
64 | } | 63 | } |
65 | if (flags & EXT2_FLAG_APPEND) { /* EXT2_APPEND_FL */ | 64 | if (flags & FS_APPEND_FL) { /* EXT2_APPEND_FL */ |
66 | inode->i_flags |= S_APPEND; | 65 | inode->i_flags |= S_APPEND; |
67 | HFSPLUS_I(inode).rootflags |= HFSPLUS_FLG_APPEND; | 66 | HFSPLUS_I(inode).rootflags |= HFSPLUS_FLG_APPEND; |
68 | } else { | 67 | } else { |
69 | inode->i_flags &= ~S_APPEND; | 68 | inode->i_flags &= ~S_APPEND; |
70 | HFSPLUS_I(inode).rootflags &= ~HFSPLUS_FLG_APPEND; | 69 | HFSPLUS_I(inode).rootflags &= ~HFSPLUS_FLG_APPEND; |
71 | } | 70 | } |
72 | if (flags & EXT2_FLAG_NODUMP) /* EXT2_NODUMP_FL */ | 71 | if (flags & FS_NODUMP_FL) /* EXT2_NODUMP_FL */ |
73 | HFSPLUS_I(inode).userflags |= HFSPLUS_FLG_NODUMP; | 72 | HFSPLUS_I(inode).userflags |= HFSPLUS_FLG_NODUMP; |
74 | else | 73 | else |
75 | HFSPLUS_I(inode).userflags &= ~HFSPLUS_FLG_NODUMP; | 74 | HFSPLUS_I(inode).userflags &= ~HFSPLUS_FLG_NODUMP; |
diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c index 67b3774820eb..37db52488262 100644 --- a/fs/jfs/ioctl.c +++ b/fs/jfs/ioctl.c | |||
@@ -6,7 +6,6 @@ | |||
6 | */ | 6 | */ |
7 | 7 | ||
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | #include <linux/ext2_fs.h> | ||
10 | #include <linux/ctype.h> | 9 | #include <linux/ctype.h> |
11 | #include <linux/capability.h> | 10 | #include <linux/capability.h> |
12 | #include <linux/time.h> | 11 | #include <linux/time.h> |
@@ -22,13 +21,13 @@ static struct { | |||
22 | long jfs_flag; | 21 | long jfs_flag; |
23 | long ext2_flag; | 22 | long ext2_flag; |
24 | } jfs_map[] = { | 23 | } jfs_map[] = { |
25 | {JFS_NOATIME_FL, EXT2_NOATIME_FL}, | 24 | {JFS_NOATIME_FL, FS_NOATIME_FL}, |
26 | {JFS_DIRSYNC_FL, EXT2_DIRSYNC_FL}, | 25 | {JFS_DIRSYNC_FL, FS_DIRSYNC_FL}, |
27 | {JFS_SYNC_FL, EXT2_SYNC_FL}, | 26 | {JFS_SYNC_FL, FS_SYNC_FL}, |
28 | {JFS_SECRM_FL, EXT2_SECRM_FL}, | 27 | {JFS_SECRM_FL, FS_SECRM_FL}, |
29 | {JFS_UNRM_FL, EXT2_UNRM_FL}, | 28 | {JFS_UNRM_FL, FS_UNRM_FL}, |
30 | {JFS_APPEND_FL, EXT2_APPEND_FL}, | 29 | {JFS_APPEND_FL, FS_APPEND_FL}, |
31 | {JFS_IMMUTABLE_FL, EXT2_IMMUTABLE_FL}, | 30 | {JFS_IMMUTABLE_FL, FS_IMMUTABLE_FL}, |
32 | {0, 0}, | 31 | {0, 0}, |
33 | }; | 32 | }; |
34 | 33 | ||
diff --git a/include/linux/ext2_fs.h b/include/linux/ext2_fs.h index 33a1aa107329..153d755376a4 100644 --- a/include/linux/ext2_fs.h +++ b/include/linux/ext2_fs.h | |||
@@ -165,41 +165,49 @@ struct ext2_group_desc | |||
165 | #define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1) | 165 | #define EXT2_N_BLOCKS (EXT2_TIND_BLOCK + 1) |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * Inode flags | 168 | * Inode flags (GETFLAGS/SETFLAGS) |
169 | */ | 169 | */ |
170 | #define EXT2_SECRM_FL 0x00000001 /* Secure deletion */ | 170 | #define EXT2_SECRM_FL FS_SECRM_FL /* Secure deletion */ |
171 | #define EXT2_UNRM_FL 0x00000002 /* Undelete */ | 171 | #define EXT2_UNRM_FL FS_UNRM_FL /* Undelete */ |
172 | #define EXT2_COMPR_FL 0x00000004 /* Compress file */ | 172 | #define EXT2_COMPR_FL FS_COMPR_FL /* Compress file */ |
173 | #define EXT2_SYNC_FL 0x00000008 /* Synchronous updates */ | 173 | #define EXT2_SYNC_FL FS_SYNC_FL /* Synchronous updates */ |
174 | #define EXT2_IMMUTABLE_FL 0x00000010 /* Immutable file */ | 174 | #define EXT2_IMMUTABLE_FL FS_IMMUTABLE_FL /* Immutable file */ |
175 | #define EXT2_APPEND_FL 0x00000020 /* writes to file may only append */ | 175 | #define EXT2_APPEND_FL FS_APPEND_FL /* writes to file may only append */ |
176 | #define EXT2_NODUMP_FL 0x00000040 /* do not dump file */ | 176 | #define EXT2_NODUMP_FL FS_NODUMP_FL /* do not dump file */ |
177 | #define EXT2_NOATIME_FL 0x00000080 /* do not update atime */ | 177 | #define EXT2_NOATIME_FL FS_NOATIME_FL /* do not update atime */ |
178 | /* Reserved for compression usage... */ | 178 | /* Reserved for compression usage... */ |
179 | #define EXT2_DIRTY_FL 0x00000100 | 179 | #define EXT2_DIRTY_FL FS_DIRTY_FL |
180 | #define EXT2_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */ | 180 | #define EXT2_COMPRBLK_FL FS_COMPRBLK_FL /* One or more compressed clusters */ |
181 | #define EXT2_NOCOMP_FL 0x00000400 /* Don't compress */ | 181 | #define EXT2_NOCOMP_FL FS_NOCOMP_FL /* Don't compress */ |
182 | #define EXT2_ECOMPR_FL 0x00000800 /* Compression error */ | 182 | #define EXT2_ECOMPR_FL FS_ECOMPR_FL /* Compression error */ |
183 | /* End compression flags --- maybe not all used */ | 183 | /* End compression flags --- maybe not all used */ |
184 | #define EXT2_BTREE_FL 0x00001000 /* btree format dir */ | 184 | #define EXT2_BTREE_FL FS_BTREE_FL /* btree format dir */ |
185 | #define EXT2_INDEX_FL 0x00001000 /* hash-indexed directory */ | 185 | #define EXT2_INDEX_FL FS_INDEX_FL /* hash-indexed directory */ |
186 | #define EXT2_IMAGIC_FL 0x00002000 /* AFS directory */ | 186 | #define EXT2_IMAGIC_FL FS_IMAGIC_FL /* AFS directory */ |
187 | #define EXT2_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */ | 187 | #define EXT2_JOURNAL_DATA_FL FS_JOURNAL_DATA_FL /* Reserved for ext3 */ |
188 | #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | 188 | #define EXT2_NOTAIL_FL FS_NOTAIL_FL /* file tail should not be merged */ |
189 | #define EXT2_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ | 189 | #define EXT2_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */ |
190 | #define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | 190 | #define EXT2_TOPDIR_FL FS_TOPDIR_FL /* Top of directory hierarchies*/ |
191 | #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | 191 | #define EXT2_RESERVED_FL FS_RESERVED_FL /* reserved for ext2 lib */ |
192 | 192 | ||
193 | #define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | 193 | #define EXT2_FL_USER_VISIBLE FS_FL_USER_VISIBLE /* User visible flags */ |
194 | #define EXT2_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ | 194 | #define EXT2_FL_USER_MODIFIABLE FS_FL_USER_MODIFIABLE /* User modifiable flags */ |
195 | 195 | ||
196 | /* | 196 | /* |
197 | * ioctl commands | 197 | * ioctl commands |
198 | */ | 198 | */ |
199 | #define EXT2_IOC_GETFLAGS _IOR('f', 1, long) | 199 | #define EXT2_IOC_GETFLAGS FS_IOC_GETFLAGS |
200 | #define EXT2_IOC_SETFLAGS _IOW('f', 2, long) | 200 | #define EXT2_IOC_SETFLAGS FS_IOC_SETFLAGS |
201 | #define EXT2_IOC_GETVERSION _IOR('v', 1, long) | 201 | #define EXT2_IOC_GETVERSION FS_IOC_GETVERSION |
202 | #define EXT2_IOC_SETVERSION _IOW('v', 2, long) | 202 | #define EXT2_IOC_SETVERSION FS_IOC_SETVERSION |
203 | |||
204 | /* | ||
205 | * ioctl commands in 32 bit emulation | ||
206 | */ | ||
207 | #define EXT2_IOC32_GETFLAGS FS_IOC32_GETFLAGS | ||
208 | #define EXT2_IOC32_SETFLAGS FS_IOC32_SETFLAGS | ||
209 | #define EXT2_IOC32_GETVERSION FS_IOC32_GETVERSION | ||
210 | #define EXT2_IOC32_SETVERSION FS_IOC32_SETVERSION | ||
203 | 211 | ||
204 | /* | 212 | /* |
205 | * Structure of an inode on the disk | 213 | * Structure of an inode on the disk |
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index cc08f56750da..a7a01ff44669 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -216,14 +216,14 @@ struct ext3_new_group_data { | |||
216 | /* | 216 | /* |
217 | * ioctl commands | 217 | * ioctl commands |
218 | */ | 218 | */ |
219 | #define EXT3_IOC_GETFLAGS _IOR('f', 1, long) | 219 | #define EXT3_IOC_GETFLAGS FS_IOC_GETFLAGS |
220 | #define EXT3_IOC_SETFLAGS _IOW('f', 2, long) | 220 | #define EXT3_IOC_SETFLAGS FS_IOC_SETFLAGS |
221 | #define EXT3_IOC_GETVERSION _IOR('f', 3, long) | 221 | #define EXT3_IOC_GETVERSION _IOR('f', 3, long) |
222 | #define EXT3_IOC_SETVERSION _IOW('f', 4, long) | 222 | #define EXT3_IOC_SETVERSION _IOW('f', 4, long) |
223 | #define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long) | 223 | #define EXT3_IOC_GROUP_EXTEND _IOW('f', 7, unsigned long) |
224 | #define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input) | 224 | #define EXT3_IOC_GROUP_ADD _IOW('f', 8,struct ext3_new_group_input) |
225 | #define EXT3_IOC_GETVERSION_OLD _IOR('v', 1, long) | 225 | #define EXT3_IOC_GETVERSION_OLD FS_IOC_GETVERSION |
226 | #define EXT3_IOC_SETVERSION_OLD _IOW('v', 2, long) | 226 | #define EXT3_IOC_SETVERSION_OLD FS_IOC_SETVERSION |
227 | #ifdef CONFIG_JBD_DEBUG | 227 | #ifdef CONFIG_JBD_DEBUG |
228 | #define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long) | 228 | #define EXT3_IOC_WAIT_FOR_READONLY _IOR('f', 99, long) |
229 | #endif | 229 | #endif |
@@ -231,6 +231,18 @@ struct ext3_new_group_data { | |||
231 | #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) | 231 | #define EXT3_IOC_SETRSVSZ _IOW('f', 6, long) |
232 | 232 | ||
233 | /* | 233 | /* |
234 | * ioctl commands in 32 bit emulation | ||
235 | */ | ||
236 | #define EXT3_IOC32_GETVERSION _IOR('f', 3, int) | ||
237 | #define EXT3_IOC32_SETVERSION _IOW('f', 4, int) | ||
238 | #define EXT3_IOC32_GETRSVSZ _IOR('f', 5, int) | ||
239 | #define EXT3_IOC32_SETRSVSZ _IOW('f', 6, int) | ||
240 | #define EXT3_IOC32_GROUP_EXTEND _IOW('f', 7, unsigned int) | ||
241 | #ifdef CONFIG_JBD_DEBUG | ||
242 | #define EXT3_IOC32_WAIT_FOR_READONLY _IOR('f', 99, int) | ||
243 | #endif | ||
244 | |||
245 | /* | ||
234 | * Mount options | 246 | * Mount options |
235 | */ | 247 | */ |
236 | struct ext3_mount_options { | 248 | struct ext3_mount_options { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1728142ec4b6..b73a47582dbe 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -217,6 +217,45 @@ extern int dir_notify_enable; | |||
217 | #define FIBMAP _IO(0x00,1) /* bmap access */ | 217 | #define FIBMAP _IO(0x00,1) /* bmap access */ |
218 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ | 218 | #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ |
219 | 219 | ||
220 | #define FS_IOC_GETFLAGS _IOR('f', 1, long) | ||
221 | #define FS_IOC_SETFLAGS _IOW('f', 2, long) | ||
222 | #define FS_IOC_GETVERSION _IOR('v', 1, long) | ||
223 | #define FS_IOC_SETVERSION _IOW('v', 2, long) | ||
224 | #define FS_IOC32_GETFLAGS _IOR('f', 1, int) | ||
225 | #define FS_IOC32_SETFLAGS _IOW('f', 2, int) | ||
226 | #define FS_IOC32_GETVERSION _IOR('v', 1, int) | ||
227 | #define FS_IOC32_SETVERSION _IOW('v', 2, int) | ||
228 | |||
229 | /* | ||
230 | * Inode flags (FS_IOC_GETFLAGS / FS_IOC_SETFLAGS) | ||
231 | */ | ||
232 | #define FS_SECRM_FL 0x00000001 /* Secure deletion */ | ||
233 | #define FS_UNRM_FL 0x00000002 /* Undelete */ | ||
234 | #define FS_COMPR_FL 0x00000004 /* Compress file */ | ||
235 | #define FS_SYNC_FL 0x00000008 /* Synchronous updates */ | ||
236 | #define FS_IMMUTABLE_FL 0x00000010 /* Immutable file */ | ||
237 | #define FS_APPEND_FL 0x00000020 /* writes to file may only append */ | ||
238 | #define FS_NODUMP_FL 0x00000040 /* do not dump file */ | ||
239 | #define FS_NOATIME_FL 0x00000080 /* do not update atime */ | ||
240 | /* Reserved for compression usage... */ | ||
241 | #define FS_DIRTY_FL 0x00000100 | ||
242 | #define FS_COMPRBLK_FL 0x00000200 /* One or more compressed clusters */ | ||
243 | #define FS_NOCOMP_FL 0x00000400 /* Don't compress */ | ||
244 | #define FS_ECOMPR_FL 0x00000800 /* Compression error */ | ||
245 | /* End compression flags --- maybe not all used */ | ||
246 | #define FS_BTREE_FL 0x00001000 /* btree format dir */ | ||
247 | #define FS_INDEX_FL 0x00001000 /* hash-indexed directory */ | ||
248 | #define FS_IMAGIC_FL 0x00002000 /* AFS directory */ | ||
249 | #define FS_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */ | ||
250 | #define FS_NOTAIL_FL 0x00008000 /* file tail should not be merged */ | ||
251 | #define FS_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ | ||
252 | #define FS_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ | ||
253 | #define FS_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ | ||
254 | |||
255 | #define FS_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ | ||
256 | #define FS_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */ | ||
257 | |||
258 | |||
220 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 | 259 | #define SYNC_FILE_RANGE_WAIT_BEFORE 1 |
221 | #define SYNC_FILE_RANGE_WRITE 2 | 260 | #define SYNC_FILE_RANGE_WRITE 2 |
222 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 | 261 | #define SYNC_FILE_RANGE_WAIT_AFTER 4 |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 28493ffaafe7..0100d6d1d84c 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -807,21 +807,19 @@ struct stat_data_v1 { | |||
807 | #define set_sd_v1_first_direct_byte(sdp,v) \ | 807 | #define set_sd_v1_first_direct_byte(sdp,v) \ |
808 | ((sdp)->sd_first_direct_byte = cpu_to_le32(v)) | 808 | ((sdp)->sd_first_direct_byte = cpu_to_le32(v)) |
809 | 809 | ||
810 | #include <linux/ext2_fs.h> | ||
811 | |||
812 | /* inode flags stored in sd_attrs (nee sd_reserved) */ | 810 | /* inode flags stored in sd_attrs (nee sd_reserved) */ |
813 | 811 | ||
814 | /* we want common flags to have the same values as in ext2, | 812 | /* we want common flags to have the same values as in ext2, |
815 | so chattr(1) will work without problems */ | 813 | so chattr(1) will work without problems */ |
816 | #define REISERFS_IMMUTABLE_FL EXT2_IMMUTABLE_FL | 814 | #define REISERFS_IMMUTABLE_FL FS_IMMUTABLE_FL |
817 | #define REISERFS_APPEND_FL EXT2_APPEND_FL | 815 | #define REISERFS_APPEND_FL FS_APPEND_FL |
818 | #define REISERFS_SYNC_FL EXT2_SYNC_FL | 816 | #define REISERFS_SYNC_FL FS_SYNC_FL |
819 | #define REISERFS_NOATIME_FL EXT2_NOATIME_FL | 817 | #define REISERFS_NOATIME_FL FS_NOATIME_FL |
820 | #define REISERFS_NODUMP_FL EXT2_NODUMP_FL | 818 | #define REISERFS_NODUMP_FL FS_NODUMP_FL |
821 | #define REISERFS_SECRM_FL EXT2_SECRM_FL | 819 | #define REISERFS_SECRM_FL FS_SECRM_FL |
822 | #define REISERFS_UNRM_FL EXT2_UNRM_FL | 820 | #define REISERFS_UNRM_FL FS_UNRM_FL |
823 | #define REISERFS_COMPR_FL EXT2_COMPR_FL | 821 | #define REISERFS_COMPR_FL FS_COMPR_FL |
824 | #define REISERFS_NOTAIL_FL EXT2_NOTAIL_FL | 822 | #define REISERFS_NOTAIL_FL FS_NOTAIL_FL |
825 | 823 | ||
826 | /* persistent flags that file inherits from the parent directory */ | 824 | /* persistent flags that file inherits from the parent directory */ |
827 | #define REISERFS_INHERIT_MASK ( REISERFS_IMMUTABLE_FL | \ | 825 | #define REISERFS_INHERIT_MASK ( REISERFS_IMMUTABLE_FL | \ |
@@ -2168,10 +2166,10 @@ int reiserfs_ioctl(struct inode *inode, struct file *filp, | |||
2168 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) | 2166 | #define REISERFS_IOC_UNPACK _IOW(0xCD,1,long) |
2169 | /* define following flags to be the same as in ext2, so that chattr(1), | 2167 | /* define following flags to be the same as in ext2, so that chattr(1), |
2170 | lsattr(1) will work with us. */ | 2168 | lsattr(1) will work with us. */ |
2171 | #define REISERFS_IOC_GETFLAGS EXT2_IOC_GETFLAGS | 2169 | #define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS |
2172 | #define REISERFS_IOC_SETFLAGS EXT2_IOC_SETFLAGS | 2170 | #define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS |
2173 | #define REISERFS_IOC_GETVERSION EXT2_IOC_GETVERSION | 2171 | #define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION |
2174 | #define REISERFS_IOC_SETVERSION EXT2_IOC_SETVERSION | 2172 | #define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION |
2175 | 2173 | ||
2176 | /* Locking primitives */ | 2174 | /* Locking primitives */ |
2177 | /* Right now we are still falling back to (un)lock_kernel, but eventually that | 2175 | /* Right now we are still falling back to (un)lock_kernel, but eventually that |