]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_fs.h: XFS_IOC_FS[SG]SETXATTR to FS_IOC_FS[SG]ETXATTR promotion
authorDave Chinner <dchinner@redhat.com>
Mon, 15 Feb 2016 01:10:05 +0000 (12:10 +1100)
committerDave Chinner <david@fromorbit.com>
Mon, 15 Feb 2016 01:10:05 +0000 (12:10 +1100)
commit83f4b5ac15fa3d583493160924b5994ebc835377
treeebce49e07886994ce9cd22a55ccb23a99d12c8ce
parent1b9fecf78f8fe43da3781d4776ac4fa9627d4cce
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>
15 files changed:
fsr/xfs_fsr.c
include/darwin.h
include/freebsd.h
include/irix.h
include/linux.h
io/attr.c
io/bmap.c
io/open.c
libxcmd/projects.c
libxfs/xfs_format.h
libxfs/xfs_fs.h
quota/free.c
quota/project.c
repair/dinode.c
rtcp/xfs_rtcp.c