]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - libxfs/xfs.h
xfsprogs: fix unaligned access in libxfs
authorChristoph Hellwig <hch@lst.de>
Fri, 28 Aug 2009 18:18:06 +0000 (15:18 -0300)
committerChristoph Hellwig <hch@brick.lst.de>
Fri, 28 Aug 2009 18:18:06 +0000 (15:18 -0300)
commit91eba724e3957a8fd1ef3c79614a3e453d151a8a
treeec7d7be49d45f9e083a08a8f094ea8d711702f3c
parent8e2153bf14b7de0cc07e29202c4a4570a3b98d60
xfsprogs: fix unaligned access in libxfs

The get/put unaligned handlers we use to access the extent descriptor
are not good enough for architectures like Sparc that do not tolerate
dereferencing unaligned pointers.  Replace the implementation with the
one the kernel uses on these architectures.  It might be a tad
slower on architectures like x86, but I don't want to have multiple
implementations around to not let the testing matrix explode.
Also remove the unaligned.h header which includes another implementation
for unaligned access we don't actually use anymore.

Note that the little change to xfs_inode.c needs to go into the kernel
aswell, I will send a patch for that shortly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reported-by: Gabriel Vlasiu <gabrielvlasiu@gmail.com>
Tested-by: Gabriel Vlasiu <gabrielvlasiu@gmail.com>
include/Makefile
include/unaligned.h [deleted file]
libxfs/xfs.h
libxfs/xfs_inode.c