aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2006-11-03 01:07:05 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-03 15:27:56 -0500
commit86f4f0f9ba6e35fbbc409dfc3d8615c1a9822482 (patch)
tree6f9ad27451e41b25e28903b2fc53b63215cabac0
parent941c7105dc4f4961727acc518e18e00b9a03cbf3 (diff)
[PATCH] fix UFS superblock alignment issues
ufs2 fails to mount on x86_64, claiming bad magic. This is because ufs_super_block_third's fs_un1 member is padded out by 4 bytes for 8-byte alignment, pushing down the rest of the struct. Forcing this to be packed solves it. I took a quick look over other on-disk structures and didn't immediately find other problems. I was able to mount & ls a populated ufs2 filesystem w/ this change. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Cc: Evgeniy Dushistov <dushistov@mail.ru> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/ufs_fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index 61eef508b041..28967eda9d7b 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -908,7 +908,7 @@ struct ufs_super_block_third {
908 __fs64 fs_csaddr; /* blk addr of cyl grp summary area */ 908 __fs64 fs_csaddr; /* blk addr of cyl grp summary area */
909 __fs64 fs_pendingblocks;/* blocks in process of being freed */ 909 __fs64 fs_pendingblocks;/* blocks in process of being freed */
910 __fs32 fs_pendinginodes;/*inodes in process of being freed */ 910 __fs32 fs_pendinginodes;/*inodes in process of being freed */
911 } fs_u2; 911 } __attribute__ ((packed)) fs_u2;
912 } fs_un1; 912 } fs_un1;
913 union { 913 union {
914 struct { 914 struct {