From: Adam Borowski <kilobyte@angband.pl>
To: "Darrick J. Wong" <darrick.wong@oracle.com>, linux-xfs@vger.kernel.org
Cc: Adam Borowski <kilobyte@angband.pl>
Subject: [PATCH] xfs: move the define for superblock magic to uapi
Date: Fri, 5 Oct 2018 14:27:41 +0200 [thread overview]
Message-ID: <20181005122741.5100-1-kilobyte@angband.pl> (raw)
Needed by users of fstatfs().
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
fs/xfs/libxfs/xfs_format.h | 3 ++-
include/uapi/linux/magic.h | 1 +
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
index 059bc44c27e8..837863c57e8c 100644
--- a/fs/xfs/libxfs/xfs_format.h
+++ b/fs/xfs/libxfs/xfs_format.h
@@ -14,6 +14,7 @@
* xfs_da_format.h, which log and log item formats are defined in
* xfs_log_format.h. Everything else goes here.
*/
+#include <linux/magic.h>
struct xfs_mount;
struct xfs_trans;
@@ -26,7 +27,7 @@ struct xfs_ifork;
* Fits into a sector-sized buffer at address 0 of each allocation group.
* Only the first of these is ever updated except during growfs.
*/
-#define XFS_SB_MAGIC 0x58465342 /* 'XFSB' */
+#define XFS_SB_MAGIC XFS_SUPER_MAGIC /* 0x58465342 = 'XFSB' */
#define XFS_SB_VERSION_1 1 /* 5.3, 6.0.1, 6.1 */
#define XFS_SB_VERSION_2 2 /* 6.2 - attributes */
#define XFS_SB_VERSION_3 3 /* 6.2 - new inode version */
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index 1a6fee974116..96c24478d8ce 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -29,6 +29,7 @@
#define HPFS_SUPER_MAGIC 0xf995e849
#define ISOFS_SUPER_MAGIC 0x9660
#define JFFS2_SUPER_MAGIC 0x72b6
+#define XFS_SUPER_MAGIC 0x58465342 /* "XFSB" */
#define PSTOREFS_MAGIC 0x6165676C
#define EFIVARFS_MAGIC 0xde5e81e4
#define HOSTFS_SUPER_MAGIC 0x00c0ffee
--
2.19.0
next reply other threads:[~2018-10-05 19:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 12:27 Adam Borowski [this message]
2018-10-05 16:06 ` [PATCH] xfs: move the define for superblock magic to uapi Darrick J. Wong
2018-10-05 18:10 ` Adam Borowski
2018-10-05 18:17 ` Darrick J. Wong
2018-10-05 18:23 ` Darrick J. Wong
2018-10-05 23:40 ` Dave Chinner
2018-10-06 22:08 ` [PATCH v2] xfs: add a define for statfs " Adam Borowski
2018-10-08 22:31 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181005122741.5100-1-kilobyte@angband.pl \
--to=kilobyte@angband.pl \
--cc=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).