]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: add fsxattr flags and fields for cowextsize
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 25 Oct 2016 22:14:31 +0000 (15:14 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Oct 2016 18:13:49 +0000 (11:13 -0700)
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 <darrick.wong@oracle.com>
include/darwin.h
include/freebsd.h
include/irix.h
include/linux.h

index 4132bfd663fc5d290a0446b4b303148d01e3863f..6c9f87ac9656a062fec3e1a9a324795e68e9c1a7 100644 (file)
@@ -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__ */
index 32268efc2c65fac3724bdb59f40d44085e4e06a7..72935ec8ff6083c8d9e6913182610bea50335a41 100644 (file)
@@ -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__ */
index 6094b8a22896c7654ccdff4e44efa44986f292e8..8bbcbd856fc7758cf6e855194e7e29b4587dd38d 100644 (file)
@@ -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.
index 06f1af42de0f9c1bb338963bb93677f9ad043bfc..ddc053e0ee2a6f63c840c03a792da46beef8c172 100644 (file)
@@ -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__ */