xfs: clean up the attr flag confusion
The ATTR_* flags have a long IRIX history, where they a userspace interface, the on-disk format and an internal interface. We've split out the on-disk interface to the XFS_ATTR_* values, but despite (or because?) of that the flag have still been a mess. Switch the internal interface to pass the on-disk XFS_ATTR_* flags for the namespace and the Linux XATTR_* flags for the actual flags instead. The ATTR_* values that are actually used are move to xfs_fs.h with a new XFS_IOC_* prefix to not conflict with the userspace version that has the same name and must have the same value. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
f3e93d95fe
commit
d5f0f49a9b
@@ -568,6 +568,16 @@ typedef struct xfs_fsop_setdm_handlereq {
|
||||
struct fsdmidata __user *data; /* DMAPI data */
|
||||
} xfs_fsop_setdm_handlereq_t;
|
||||
|
||||
/*
|
||||
* Flags passed in xfs_attr_multiop.am_flags for the attr ioctl interface.
|
||||
*
|
||||
* NOTE: Must match the values declared in libattr without the XFS_IOC_ prefix.
|
||||
*/
|
||||
#define XFS_IOC_ATTR_ROOT 0x0002 /* use attrs in root namespace */
|
||||
#define XFS_IOC_ATTR_SECURE 0x0008 /* use attrs in security namespace */
|
||||
#define XFS_IOC_ATTR_CREATE 0x0010 /* fail if attr already exists */
|
||||
#define XFS_IOC_ATTR_REPLACE 0x0020 /* fail if attr does not exist */
|
||||
|
||||
typedef struct xfs_attrlist_cursor {
|
||||
__u32 opaque[4];
|
||||
} xfs_attrlist_cursor_t;
|
||||
@@ -609,7 +619,7 @@ typedef struct xfs_attr_multiop {
|
||||
void __user *am_attrname;
|
||||
void __user *am_attrvalue;
|
||||
__u32 am_length;
|
||||
__u32 am_flags;
|
||||
__u32 am_flags; /* XFS_IOC_ATTR_* */
|
||||
} xfs_attr_multiop_t;
|
||||
|
||||
typedef struct xfs_fsop_attrmulti_handlereq {
|
||||
|
Reference in New Issue
Block a user