xfs_fs.h: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion
The kernel commit to make this ioctl promotion (
bb99e06ddf) moved
the definitions for the XFS ioctl to uapi/linux/fs.h for the
following reason:
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.
This means we now need to handle this change in userspace as the
uapi/linux/fs.h file may not contain the definitions (i.e. new
xfsprogs/ old linux uapi files) xfsprogs needs to build. Hence we
need to massage the definition in xfs_fs.h to take the values from
the system header if it exists, otherwise keep the old definitions
for compatibility and platforms other than linux.
To this extent, we add the FS* definitions to the platform headers
so the FS* versions are available on all platforms, and add trivial
defines to xfs_fs.h to present the XFS* versions for backwards
compatibility with existing code. New code should always use the FS*
versions, and as such we also convert all the users of XFS* in
xfsprogs to use the FS* definitions.
Signed-off-by: Dave Chinner <dchinner@redhat.com>