[syslinux] [PATCH] ext4: Fix 64bit feature

Gene Cumm gene.cumm at gmail.com
Sun Oct 15 05:36:31 PDT 2017


Merged.

On Sun, Aug 27, 2017 at 4:03 PM, Paulo Alcantara <pcacjr at zytor.com> wrote:
> As per ext4 specification:
>
>> In ext2, ext3, and ext4 (when the 64bit feature is not enabled), the
>> block group descriptor was only 32 bytes long and therefore ends at
>> bg_checksum. On an ext4 filesystem with the 64bit feature enabled, the
>> block group descriptor expands to at least the 64 bytes described below;
>> the size is stored in the superblock.
>
> Since block group descriptor has been expanded to 64 bytes long (when 64
> bit feature is enabled), we cannot index ext2_group_desc and return it
> *directly* -- as we did it in ext2_get_group_desc -- it's still 32 bytes
> long.
>
> Instead, use s_desc_size field from superblock to correctly index and
> return block group descriptors.
>
> Cc: H. Peter Anvin <hpa at zytor.com>
> Cc: Gene Cumm <gene.cumm at gmail.com>
> Signed-off-by: Paulo Alcantara <pcacjr at zytor.com>
> ---
>  core/fs/ext2/ext2.c    | 23 ++++++++++++++---------
>  core/fs/ext2/ext2_fs.h |  1 +
>  2 files changed, 15 insertions(+), 9 deletions(-)


More information about the Syslinux mailing list