grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub2 ChangeLog config.h.in fs/ext2.c


From: Hollis Blanchard
Subject: Re: grub2 ChangeLog config.h.in fs/ext2.c
Date: Sun, 18 Mar 2007 13:27:14 -0500

On Sun, 2007-03-18 at 01:18 +0000, Yoshinori K. Okuji wrote:
> 
> Log message:
>       2007-03-18  Yoshinori K. Okuji  <address@hidden>
>       
>           * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
>           superblock instead of the structure size to compute an
>           offset. This fixes the problem that GRUB could not read a
>           filesystem when inode size is different from 128-byte.

> diff -u -r1.13 -r1.14
> --- grub2/fs/ext2.c   2006/06/04 15:56:54     1.13
> +++ grub2/fs/ext2.c   2007/03/18 01:18:39     1.14
> @@ -294,7 +294,7 @@
>    if (grub_disk_read (data->disk, 
>                     ((grub_le_to_cpu32 (blkgrp.inode_table_id) + blkno)
>                      << LOG2_EXT2_BLOCK_SIZE (data)),
> -                   sizeof (struct grub_ext2_inode) * blkoff,
> +                   grub_le_to_cpu16 (sblock->inode_size) * blkoff,
>                     sizeof (struct grub_ext2_inode), (char *) inode))
>      return grub_errno;

If the inode size is not 128 bytes, why do we still read `sizeof (struct
grub_ext2_inode)' bytes from disk? What is the layout of a non-128-byte
inode?

-Hollis





reply via email to

[Prev in Thread] Current Thread [Next in Thread]