From: Darrick J. Wong Date: Tue, 25 Oct 2016 22:14:31 +0000 (-0700) Subject: libxfs: add fsxattr flags and fields for cowextsize X-Git-Tag: v4.9.0-rc1~57 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bc58d9361602943b9f729d7ea01ef3c88d6b172;p=thirdparty%2Fxfsprogs-dev.git libxfs: add fsxattr flags and fields for cowextsize Add the cowextsize field and flag to each platform's struct fsxattr definitions. We can compile these definitions into the xfsprogs utilities if we don't pick them up from the system headers, such as on kernels prior to 4.9. Signed-off-by: Darrick J. Wong --- diff --git a/include/darwin.h b/include/darwin.h index 4132bfd66..6c9f87ac9 100644 --- a/include/darwin.h +++ b/include/darwin.h @@ -292,7 +292,8 @@ struct fsxattr { __u32 fsx_extsize; /* extsize field value (get/set)*/ __u32 fsx_nextents; /* nextents field value (get) */ __u32 fsx_projid; /* project identifier (get/set) */ - unsigned char fsx_pad[12]; + __u32 fsx_cowextsize; /* cow extsize field value (get/set) */ + unsigned char fsx_pad[8]; }; /* @@ -320,4 +321,8 @@ struct fsxattr { #endif +#ifndef FS_XFLAG_COWEXTSIZE +#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ +#endif + #endif /* __XFS_DARWIN_H__ */ diff --git a/include/freebsd.h b/include/freebsd.h index 32268efc2..72935ec8f 100644 --- a/include/freebsd.h +++ b/include/freebsd.h @@ -181,7 +181,8 @@ struct fsxattr { __u32 fsx_extsize; /* extsize field value (get/set)*/ __u32 fsx_nextents; /* nextents field value (get) */ __u32 fsx_projid; /* project identifier (get/set) */ - unsigned char fsx_pad[12]; + __u32 fsx_cowextsize; /* cow extsize field value (get/set) */ + unsigned char fsx_pad[8]; }; /* @@ -209,5 +210,8 @@ struct fsxattr { #endif +#ifndef FS_XFLAG_COWEXTSIZE +#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ +#endif #endif /* __XFS_FREEBSD_H__ */ diff --git a/include/irix.h b/include/irix.h index 6094b8a22..8bbcbd856 100644 --- a/include/irix.h +++ b/include/irix.h @@ -427,7 +427,8 @@ struct fsxattr { __u32 fsx_extsize; /* extsize field value (get/set)*/ __u32 fsx_nextents; /* nextents field value (get) */ __u32 fsx_projid; /* project identifier (get/set) */ - unsigned char fsx_pad[12]; + __u32 fsx_cowextsize; /* cow extsize field value (get/set) */ + unsigned char fsx_pad[8]; }; /* @@ -455,6 +456,9 @@ struct fsxattr { #endif +#ifndef FS_XFLAG_COWEXTSIZE +#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ +#endif /** * Abstraction of mountpoints. diff --git a/include/linux.h b/include/linux.h index 06f1af42d..ddc053e0e 100644 --- a/include/linux.h +++ b/include/linux.h @@ -181,7 +181,8 @@ struct fsxattr { __u32 fsx_extsize; /* extsize field value (get/set)*/ __u32 fsx_nextents; /* nextents field value (get) */ __u32 fsx_projid; /* project identifier (get/set) */ - unsigned char fsx_pad[12]; + __u32 fsx_cowextsize; /* cow extsize field value (get/set) */ + unsigned char fsx_pad[8]; }; /* @@ -209,4 +210,8 @@ struct fsxattr { #endif +#ifndef FS_XFLAG_COWEXTSIZE +#define FS_XFLAG_COWEXTSIZE 0x00010000 /* CoW extent size allocator hint */ +#endif + #endif /* __XFS_LINUX_H__ */