Nicolas ENG
2008-03-12 16:13:11 UTC
I wasn't able to create an ext3cow filesystem using mkfs on big endian
architecture.
The problem was in struct ext2_dir_entry_2.
From ext2_dir_entry to ext2_dir_entry_2 the two bytes of name_len hava been
separated to
manage file type in a nicer way. This was previously done directly in the
higher byte of
name_len, since name_len <=255.
Since the handling of the two bytes as two different fields was not
implemented in the rest
of the code, separating them will result in the loss of file_type value for
little endian systems
(probably harmless) and in a wrong evaluation of name_len on big endian
systems.
Moreover, super block epoch number wasn't displayed in the correct byte
order.
See attached patch.
Nicolas Eng
architecture.
The problem was in struct ext2_dir_entry_2.
From ext2_dir_entry to ext2_dir_entry_2 the two bytes of name_len hava been
separated to
manage file type in a nicer way. This was previously done directly in the
higher byte of
name_len, since name_len <=255.
Since the handling of the two bytes as two different fields was not
implemented in the rest
of the code, separating them will result in the loss of file_type value for
little endian systems
(probably harmless) and in a wrong evaluation of name_len on big endian
systems.
Moreover, super block epoch number wasn't displayed in the correct byte
order.
See attached patch.
Nicolas Eng