Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1HT07Y-0006zZ-VS for mharc-grub-devel@gnu.org; Sun, 18 Mar 2007 14:28:45 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HT07Y-0006yz-EK for grub-devel@gnu.org; Sun, 18 Mar 2007 14:28:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HT07W-0006w8-Su for grub-devel@gnu.org; Sun, 18 Mar 2007 14:28:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HT07W-0006w5-Nk for grub-devel@gnu.org; Sun, 18 Mar 2007 13:28:42 -0500 Received: from pop-cowbird.atl.sa.earthlink.net ([207.69.195.68]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HT068-0000Q4-SW; Sun, 18 Mar 2007 14:27:17 -0400 Received: from user-0vvdf2d.cable.mindspring.com ([63.246.188.77] helo=[192.168.0.2]) by pop-cowbird.atl.sa.earthlink.net with esmtp (Exim 3.36 #1) id 1HT068-0007CO-00; Sun, 18 Mar 2007 14:27:16 -0400 From: Hollis Blanchard To: "Yoshinori K. Okuji" In-Reply-To: References: Content-Type: text/plain Date: Sun, 18 Mar 2007 13:27:14 -0500 Message-Id: <1174242434.26780.32.camel@diesel> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-1.fc6) Content-Transfer-Encoding: 7bit X-detected-kernel: Solaris 8 (1) Cc: grub-devel Subject: Re: grub2 ChangeLog config.h.in fs/ext2.c X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Mar 2007 18:28:44 -0000 On Sun, 2007-03-18 at 01:18 +0000, Yoshinori K. Okuji wrote: > > Log message: > 2007-03-18 Yoshinori K. Okuji > > * 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