All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: grub2 ChangeLog config.h.in fs/ext2.c
       [not found] <E1HSk2h-00082T-4b@savannah.gnu.org>
@ 2007-03-18 18:27 ` Hollis Blanchard
  2007-03-19  0:07   ` Yoshinori K. Okuji
  0 siblings, 1 reply; 2+ messages in thread
From: Hollis Blanchard @ 2007-03-18 18:27 UTC (permalink / raw)
  To: Yoshinori K. Okuji; +Cc: grub-devel

On Sun, 2007-03-18 at 01:18 +0000, Yoshinori K. Okuji wrote:
> 
> Log message:
> 	2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
> 	
> 	    * 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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: grub2 ChangeLog config.h.in fs/ext2.c
  2007-03-18 18:27 ` grub2 ChangeLog config.h.in fs/ext2.c Hollis Blanchard
@ 2007-03-19  0:07   ` Yoshinori K. Okuji
  0 siblings, 0 replies; 2+ messages in thread
From: Yoshinori K. Okuji @ 2007-03-19  0:07 UTC (permalink / raw)
  To: grub-devel

On Sunday 18 March 2007 19:27, Hollis Blanchard wrote:
> If the inode size is not 128 bytes, why do we still read `sizeof (struct
> grub_ext2_inode)' bytes from disk?

Because we don't need more than that.

> What is the layout of a non-128-byte 
> inode?

There is extra space right after the traditional inode structure. Currently, 
it can be used only for xattr. If you are interested in the details, look at 
fs/ext3/inode.c in Linux.

Okuji



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-19  0:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1HSk2h-00082T-4b@savannah.gnu.org>
2007-03-18 18:27 ` grub2 ChangeLog config.h.in fs/ext2.c Hollis Blanchard
2007-03-19  0:07   ` Yoshinori K. Okuji

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.