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:20:49 +0000 (16:20 -0400)
commitbfc1856029ff6851845de27114fea899bbdbccbe
tree9a258810a624c8b8d72e6de845aac238f69a0008
parentb46fbf3d52e722d9810dad97a5fa443b280c8a82
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>
lib/ext2fs/imager.c
lib/ext2fs/inode.c
lib/ext2fs/openfs.c
lib/ext2fs/rw_bitmaps.c
misc/e2image.c