]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[XFS] Fix superblock features2 field alignment problem
authorDavid Chinner <dgc@sgi.com>
Thu, 6 Mar 2008 02:45:50 +0000 (13:45 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Thu, 10 Apr 2008 06:25:15 +0000 (16:25 +1000)
commitee1c090825bf2f1cb9712489c234eabf69a9a78f
treec261cbeeda46937e6c65994b4348227505665f66
parent6211870992502efdccf9cd6bae155c83277835fa
[XFS] Fix superblock features2 field alignment problem

Due to the xfs_dsb_t structure not being 64 bit aligned, the last field of
the on-disk superblock can vary in location This causes problems when the
filesystem gets moved to a different platform, or there is a 32 bit
userspace and 64 bit kernel.

This patch detects the defect at mount time, logs a warning such as:

XFS: correcting sb_features alignment problem

in dmesg and corrects the problem so that everything is OK. it also
blacklists the bad field in the superblock so it does not get used for
something else later on.

SGI-PV: 977636
SGI-Modid: xfs-linux-melb:xfs-kern:30539a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_mount.c
fs/xfs/xfs_sb.h