Whamcloud - gitweb
e2image: fix metadata image handling on big endian systems
authorLukas Czerner <lczerner@redhat.com>
Mon, 9 Apr 2018 15:58:15 +0000 (11:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Apr 2018 20:21:29 +0000 (16:21 -0400)
commit3bf5261174ed55a2e7050c46838a16c08174b198
tree534a2487d77f6167add932f36b219abaa3e00430
parent635300c774f4c760baf7c9f8891023df66cd12a2
e2image: fix metadata image handling on big endian systems

Currently e2image metadata image handling and creating is completely
broken on big endian systems. It just does not care about endianness at
all. This was uncovered With addition of i_bitmaps test, which is the
first test that actually tests e2image metadata image.

Fix it by making sure that all on-disk metadata that we write and read
to/from the metadata image is properly converted.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit bfc1856029ff6851845de27114fea899bbdbccbe)
lib/ext2fs/imager.c
lib/ext2fs/inode.c
lib/ext2fs/openfs.c
lib/ext2fs/rw_bitmaps.c
misc/e2image.c