[PATCH] BLOCK: Move common FS-specific ioctls to linux/fs.h [try #6]

Move common FS-specific ioctls from linux/ext2_fs.h to linux/fs.h as FS_IOC_*
and FS_IOC32_* and have the users of them use those as a base.

Also move the GETFLAGS/SETFLAGS flags to linux/fs.h as FS_*_FL macros, and then
have the other users use them as a base.

Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
David Howells
2006-08-29 19:06:16 +01:00
committed by Jens Axboe
parent 863d5b822c
commit 36695673b0
9 changed files with 123 additions and 88 deletions
+13 -15
View File
@@ -807,21 +807,19 @@ struct stat_data_v1 {
#define set_sd_v1_first_direct_byte(sdp,v) \
((sdp)->sd_first_direct_byte = cpu_to_le32(v))
#include <linux/ext2_fs.h>
/* inode flags stored in sd_attrs (nee sd_reserved) */
/* we want common flags to have the same values as in ext2,
so chattr(1) will work without problems */
#define REISERFS_IMMUTABLE_FL EXT2_IMMUTABLE_FL
#define REISERFS_APPEND_FL EXT2_APPEND_FL
#define REISERFS_SYNC_FL EXT2_SYNC_FL
#define REISERFS_NOATIME_FL EXT2_NOATIME_FL
#define REISERFS_NODUMP_FL EXT2_NODUMP_FL
#define REISERFS_SECRM_FL EXT2_SECRM_FL
#define REISERFS_UNRM_FL EXT2_UNRM_FL
#define REISERFS_COMPR_FL EXT2_COMPR_FL
#define REISERFS_NOTAIL_FL EXT2_NOTAIL_FL
#define REISERFS_IMMUTABLE_FL FS_IMMUTABLE_FL
#define REISERFS_APPEND_FL FS_APPEND_FL
#define REISERFS_SYNC_FL FS_SYNC_FL
#define REISERFS_NOATIME_FL FS_NOATIME_FL
#define REISERFS_NODUMP_FL FS_NODUMP_FL
#define REISERFS_SECRM_FL FS_SECRM_FL
#define REISERFS_UNRM_FL FS_UNRM_FL
#define REISERFS_COMPR_FL FS_COMPR_FL
#define REISERFS_NOTAIL_FL FS_NOTAIL_FL
/* persistent flags that file inherits from the parent directory */
#define REISERFS_INHERIT_MASK ( REISERFS_IMMUTABLE_FL | \
@@ -2168,10 +2166,10 @@ int reiserfs_ioctl(struct inode *inode, struct file *filp,
#define REISERFS_IOC_UNPACK _IOW(0xCD,1,long)
/* define following flags to be the same as in ext2, so that chattr(1),
lsattr(1) will work with us. */
#define REISERFS_IOC_GETFLAGS EXT2_IOC_GETFLAGS
#define REISERFS_IOC_SETFLAGS EXT2_IOC_SETFLAGS
#define REISERFS_IOC_GETVERSION EXT2_IOC_GETVERSION
#define REISERFS_IOC_SETVERSION EXT2_IOC_SETVERSION
#define REISERFS_IOC_GETFLAGS FS_IOC_GETFLAGS
#define REISERFS_IOC_SETFLAGS FS_IOC_SETFLAGS
#define REISERFS_IOC_GETVERSION FS_IOC_GETVERSION
#define REISERFS_IOC_SETVERSION FS_IOC_SETVERSION
/* Locking primitives */
/* Right now we are still falling back to (un)lock_kernel, but eventually that