xfs_io: add support for stx_mnt_id and stx_version fields

Add support for the new mnt_id field and the proposed change_attr field
in statx to xfs_io. Add a new autoconf test to see whether the system's
struct statx has the requisite fields. If not, or if there is no struct
statx defined, then use the internal definitions in statx.h.

Wrap most of the preprocessor constants in #ifdefs so that we only
redefine the values needed. Since we can't undefine a struct definition,
postfix their names with "_internal" and use the preprocessor to
override the struct definitions.

Cc: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Jeff Layton <jlayton@kernel.org>
5 files changed