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.
Date: Fri Feb 22 17:39:13 AEDT 2008
Workarea: chook.melbourne.sgi.com:/build/dgc/isms/2.6.x-xfs
Inspected by: sandeen@xxxxxxxxxxx,hch@xxxxxxxxxxxxx
The following file(s) were checked into:
longdrop.melbourne.sgi.com:/isms/linux/2.6.x-xfs-melb
Modid: xfs-linux-melb:xfs-kern:30539a
fs/xfs/xfs_sb.h - 1.71 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_sb.h.diff?r1=text&tr1=1.71&r2=text&tr2=1.70&f=h
- Detect and correct the features2 field of the superblock
being misaligned. Blacklist the misaligned field so it
does not get reused in future.
fs/xfs/xfs_mount.c - 1.419 - changed
http://oss.sgi.com/cgi-bin/cvsweb.cgi/xfs-linux/xfs_mount.c.diff?r1=text&tr1=1.419&r2=text&tr2=1.418&f=h
- Detect and correct the features2 field of the superblock
being misaligned. Blacklist the misaligned field so it
does not get reused in future.
|