]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
missing: add XFS magic
authorLennart Poettering <lennart@poettering.net>
Fri, 28 Dec 2018 18:01:53 +0000 (19:01 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 4 Dec 2019 10:01:31 +0000 (11:01 +0100)
src/basic/missing_magic.h
src/basic/missing_xfs.h [new file with mode: 0644]

index 4910cd368f90ad67e9b44dcbefe956dbbb639464..a05b5b5c3c0909871511b57396a94f18644b5f8d 100644 (file)
@@ -32,3 +32,8 @@
 #ifndef MQUEUE_MAGIC
 #define MQUEUE_MAGIC 0x19800202
 #endif
+
+/* Not exposed yet (as of Linux 5.4). Defined in fs/xfs/libxfs/xfs_format.h */
+#ifndef XFS_SB_MAGIC
+#define XFS_SB_MAGIC 0x58465342
+#endif
diff --git a/src/basic/missing_xfs.h b/src/basic/missing_xfs.h
new file mode 100644 (file)
index 0000000..9eac76d
--- /dev/null
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
+#pragma once
+
+/* This is currently not exported in the public kernel headers, but the libxfs library code part of xfsprogs
+ * defines it as public header */
+
+#ifndef XFS_IOC_FSGEOMETRY
+#define XFS_IOC_FSGEOMETRY _IOR ('X', 124, struct xfs_fsop_geom)
+
+typedef struct xfs_fsop_geom {
+        uint32_t blocksize;
+        uint32_t rtextsize;
+        uint32_t agblocks;
+        uint32_t agcount;
+        uint32_t logblocks;
+        uint32_t sectsize;
+        uint32_t inodesize;
+        uint32_t imaxpct;
+        uint64_t datablocks;
+        uint64_t rtblocks;
+        uint64_t rtextents;
+        uint64_t logstart;
+        unsigned char uuid[16];
+        uint32_t sunit;
+        uint32_t swidth;
+        int32_t version;
+        uint32_t flags;
+        uint32_t logsectsize;
+        uint32_t rtsectsize;
+        uint32_t dirblocksize;
+        uint32_t logsunit;
+} xfs_fsop_geom_t;
+#endif
+
+#ifndef XFS_IOC_FSGROWFSDATA
+#define XFS_IOC_FSGROWFSDATA _IOW ('X', 110, struct xfs_growfs_data)
+
+typedef struct xfs_growfs_data {
+        uint64_t newblocks;
+        uint32_t imaxpct;
+} xfs_growfs_data_t;
+#endif