diff options
author | Dave Chinner <dchinner@redhat.com> | 2016-01-04 00:44:15 -0500 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-01-04 00:44:15 -0500 |
commit | 334e580a6f97e2e84d1c19a8679603956acaa622 (patch) | |
tree | eb819ec967343ed2b6c635d425f0f58bd669d64d /fs/xfs | |
parent | 168309855a7d1e16db751e9c647119fe2d2dc878 (diff) |
fs: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion
Hoist the ioctl definitions for the XFS_IOC_FS[SG]SETXATTR API from
fs/xfs/libxfs/xfs_fs.h to include/uapi/linux/fs.h so that the ioctls
can be used by all filesystems, not just XFS. This enables
(initially) ext4 to use the ioctl to set project IDs on inodes.
Based-on-patch-from: Li Xi <lixi@ddn.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/libxfs/xfs_fs.h | 51 |
1 files changed, 18 insertions, 33 deletions
diff --git a/fs/xfs/libxfs/xfs_fs.h b/fs/xfs/libxfs/xfs_fs.h index b2b73a998d42..dd29d0a670bd 100644 --- a/fs/xfs/libxfs/xfs_fs.h +++ b/fs/xfs/libxfs/xfs_fs.h | |||
@@ -36,38 +36,23 @@ struct dioattr { | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | /* | 38 | /* |
39 | * Structure for XFS_IOC_FSGETXATTR[A] and XFS_IOC_FSSETXATTR. | 39 | * Flags for the bs_xflags/fsx_xflags field in FS_IOC_FS[GS]ETXATTR[A] |
40 | */ | 40 | */ |
41 | #ifndef HAVE_FSXATTR | 41 | #define XFS_XFLAG_REALTIME FS_XFLAG_REALTIME |
42 | struct fsxattr { | 42 | #define XFS_XFLAG_PREALLOC FS_XFLAG_PREALLOC |
43 | __u32 fsx_xflags; /* xflags field value (get/set) */ | 43 | #define XFS_XFLAG_IMMUTABLE FS_XFLAG_IMMUTABLE |
44 | __u32 fsx_extsize; /* extsize field value (get/set)*/ | 44 | #define XFS_XFLAG_APPEND FS_XFLAG_APPEND |
45 | __u32 fsx_nextents; /* nextents field value (get) */ | 45 | #define XFS_XFLAG_SYNC FS_XFLAG_SYNC |
46 | __u32 fsx_projid; /* project identifier (get/set) */ | 46 | #define XFS_XFLAG_NOATIME FS_XFLAG_NOATIME |
47 | unsigned char fsx_pad[12]; | 47 | #define XFS_XFLAG_NODUMP FS_XFLAG_NODUMP |
48 | }; | 48 | #define XFS_XFLAG_RTINHERIT FS_XFLAG_RTINHERIT |
49 | #endif | 49 | #define XFS_XFLAG_PROJINHERIT FS_XFLAG_PROJINHERIT |
50 | 50 | #define XFS_XFLAG_NOSYMLINKS FS_XFLAG_NOSYMLINKS | |
51 | /* | 51 | #define XFS_XFLAG_EXTSIZE FS_XFLAG_EXTSIZE |
52 | * Flags for the bs_xflags/fsx_xflags field | 52 | #define XFS_XFLAG_EXTSZINHERIT FS_XFLAG_EXTSZINHERIT |
53 | * There should be a one-to-one correspondence between these flags and the | 53 | #define XFS_XFLAG_NODEFRAG FS_XFLAG_NODEFRAG |
54 | * XFS_DIFLAG_s. | 54 | #define XFS_XFLAG_FILESTREAM FS_XFLAG_FILESTREAM |
55 | */ | 55 | #define XFS_XFLAG_HASATTR FS_XFLAG_HASATTR |
56 | #define XFS_XFLAG_REALTIME 0x00000001 /* data in realtime volume */ | ||
57 | #define XFS_XFLAG_PREALLOC 0x00000002 /* preallocated file extents */ | ||
58 | #define XFS_XFLAG_IMMUTABLE 0x00000008 /* file cannot be modified */ | ||
59 | #define XFS_XFLAG_APPEND 0x00000010 /* all writes append */ | ||
60 | #define XFS_XFLAG_SYNC 0x00000020 /* all writes synchronous */ | ||
61 | #define XFS_XFLAG_NOATIME 0x00000040 /* do not update access time */ | ||
62 | #define XFS_XFLAG_NODUMP 0x00000080 /* do not include in backups */ | ||
63 | #define XFS_XFLAG_RTINHERIT 0x00000100 /* create with rt bit set */ | ||
64 | #define XFS_XFLAG_PROJINHERIT 0x00000200 /* create with parents projid */ | ||
65 | #define XFS_XFLAG_NOSYMLINKS 0x00000400 /* disallow symlink creation */ | ||
66 | #define XFS_XFLAG_EXTSIZE 0x00000800 /* extent size allocator hint */ | ||
67 | #define XFS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */ | ||
68 | #define XFS_XFLAG_NODEFRAG 0x00002000 /* do not defragment */ | ||
69 | #define XFS_XFLAG_FILESTREAM 0x00004000 /* use filestream allocator */ | ||
70 | #define XFS_XFLAG_HASATTR 0x80000000 /* no DIFLAG for this */ | ||
71 | 56 | ||
72 | /* | 57 | /* |
73 | * Structure for XFS_IOC_GETBMAP. | 58 | * Structure for XFS_IOC_GETBMAP. |
@@ -514,8 +499,8 @@ typedef struct xfs_swapext | |||
514 | #define XFS_IOC_ALLOCSP _IOW ('X', 10, struct xfs_flock64) | 499 | #define XFS_IOC_ALLOCSP _IOW ('X', 10, struct xfs_flock64) |
515 | #define XFS_IOC_FREESP _IOW ('X', 11, struct xfs_flock64) | 500 | #define XFS_IOC_FREESP _IOW ('X', 11, struct xfs_flock64) |
516 | #define XFS_IOC_DIOINFO _IOR ('X', 30, struct dioattr) | 501 | #define XFS_IOC_DIOINFO _IOR ('X', 30, struct dioattr) |
517 | #define XFS_IOC_FSGETXATTR _IOR ('X', 31, struct fsxattr) | 502 | #define XFS_IOC_FSGETXATTR FS_IOC_FSGETXATTR |
518 | #define XFS_IOC_FSSETXATTR _IOW ('X', 32, struct fsxattr) | 503 | #define XFS_IOC_FSSETXATTR FS_IOC_FSSETXATTR |
519 | #define XFS_IOC_ALLOCSP64 _IOW ('X', 36, struct xfs_flock64) | 504 | #define XFS_IOC_ALLOCSP64 _IOW ('X', 36, struct xfs_flock64) |
520 | #define XFS_IOC_FREESP64 _IOW ('X', 37, struct xfs_flock64) | 505 | #define XFS_IOC_FREESP64 _IOW ('X', 37, struct xfs_flock64) |
521 | #define XFS_IOC_GETBMAP _IOWR('X', 38, struct getbmap) | 506 | #define XFS_IOC_GETBMAP _IOWR('X', 38, struct getbmap) |