summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorDarrick J. Wong2016-03-08 22:15:14 +0100
committerDave Chinner2016-03-08 22:15:14 +0100
commit30cbc591c34e680e8b5d6d675ea49effe42a0570 (patch)
tree8580f806e3ebe6f762bd4fb472d29539bd736034 /fs/xfs/xfs_super.c
parentxfs: use named array initializers for log item dumping (diff)
downloadkernel-qcow2-linux-30cbc591c34e680e8b5d6d675ea49effe42a0570.tar.gz
kernel-qcow2-linux-30cbc591c34e680e8b5d6d675ea49effe42a0570.tar.xz
kernel-qcow2-linux-30cbc591c34e680e8b5d6d675ea49effe42a0570.zip
xfs: check sizes of XFS on-disk structures at compile time
Check the sizes of XFS on-disk structures when compiling the kernel. Use this to catch inadvertent changes in structure size due to padding and alignment issues, etc. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 59c9b7bd958d..3bd2027a7ea6 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -45,6 +45,7 @@
#include "xfs_filestream.h"
#include "xfs_quota.h"
#include "xfs_sysfs.h"
+#include "xfs_ondisk.h"
#include <linux/namei.h>
#include <linux/init.h>
@@ -1817,6 +1818,8 @@ init_xfs_fs(void)
{
int error;
+ xfs_check_ondisk_structs();
+
printk(KERN_INFO XFS_VERSION_STRING " with "
XFS_BUILD_OPTIONS " enabled\n");