Whamcloud - gitweb
Fix ext2fs_swap_inode_full() for in-inode xattrs on big-endian machines
authorEric Sandeen <sandeen@redhat.com>
Fri, 29 Feb 2008 22:10:21 +0000 (16:10 -0600)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 14 Mar 2008 18:32:53 +0000 (14:32 -0400)
commit82e541885ea912bc6764b97e2545f851cf7e3ff3
tree8746b066f072c2106a0868f710aa94f2c52cfcdc
parentda078326b6d71438b6b0e7d063ce2e3ba5fb5fab
Fix ext2fs_swap_inode_full() for in-inode xattrs on big-endian machines

After the fix for resize2fs's inode mover losing in-inode
extended attributes, the regression test I wrote caught
that the attrs were still getting lost on powerpc.

Looks like the problem is that ext2fs_swap_inode_full()
isn't paying attention to whether or not the EA magic is
in hostorder, so it's not recognized (and not swapped)
on BE machines.  Patch below seems to fix it.

Yay for regression tests.  ;)

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/swapfs.c