From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OYUvf-0003XG-GS for mharc-grub-devel@gnu.org; Mon, 12 Jul 2010 22:09:03 -0400 Received: from [140.186.70.92] (port=35609 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYUvd-0003Vq-3l for grub-devel@gnu.org; Mon, 12 Jul 2010 22:09:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYUvb-0003io-I4 for grub-devel@gnu.org; Mon, 12 Jul 2010 22:09:00 -0400 Received: from mail2.asahi-net.or.jp ([202.224.39.198]:27107) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYUvb-0003iQ-39 for grub-devel@gnu.org; Mon, 12 Jul 2010 22:08:59 -0400 Received: from rabbit.sekiba.org (x238029.ppp.asahi-net.or.jp [122.249.238.29]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id 48A2DABC75 for ; Tue, 13 Jul 2010 11:08:55 +0900 (JST) Date: Tue, 13 Jul 2010 11:08:54 +0900 Message-ID: <871vb816bt.wl%jir@sekiba.com> From: Jiro SEKIBA To: The development of GNU GRUB In-Reply-To: <4C3BA145.8020002@gmail.com> References: <87pqyzwmf5.wl%jir@sekiba.com> <4C3BA145.8020002@gmail.com> User-Agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.8 Emacs/22.3 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] fix calculation of 2nd superblock position. X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2010 02:09:02 -0000 At Tue, 13 Jul 2010 01:12:05 +0200, Vladimir '=F6-coder/phcoder' Serbinenko wrote: >=20 > [1 ] > [1.1 ] > On 07/07/2010 01:39 PM, Jiro SEKIBA wrote: > > Hi, > > > > This patch fixes calculation of 2nd superblock position. > > > > nilfs2 has two super blocks, the 1st one is at beginning of the partiti= on, > > the 2nd one is the end of partition. 2nd one resides at last 4k block. > > However when the partition size is not a multiple of 4k bytes, the > > remainder will be ignored. > > > > 2010-07-07 Jiro SEKIBA > > > > * fs/nilfs2.c: fix macro NILFS_2ND_SUPER_BLOCK to calculate > > 2nd superblock position from partition size. > > > > =20 > Go ahead for trunk Sorry, but what am I supposed to do? Did I have a write access to the trunk? > > =3D=3D=3D modified file 'fs/nilfs2.c' > > --- fs/nilfs2.c 2010-05-31 18:49:42 +0000 > > +++ fs/nilfs2.c 2010-07-07 10:58:13 +0000 > > @@ -52,9 +52,9 @@ > > /* nilfs 1st super block posission from beginning of the partition > > in 512 block size */ > > #define NILFS_1ST_SUPER_BLOCK 2 > > -/* nilfs 2nd super block posission from end of the partition > > +/* nilfs 2nd super block posission from beginning of the partition > > in 512 block size */ > > -#define NILFS_2ND_SUPER_BLOCK 8 > > +#define NILFS_2ND_SUPER_BLOCK(devsize) (((devsize >> 3) - 1) << 3) > > =20 > > struct grub_nilfs2_inode > > { > > @@ -729,7 +729,7 @@ > > if (partition_size !=3D GRUB_DISK_SIZE_UNKNOWN) > > { > > /* Read second super block. */ > > - grub_disk_read (disk, partition_size - NILFS_2ND_SUPER_BLOCK, 0, > > + grub_disk_read (disk, NILFS_2ND_SUPER_BLOCK (partition_size), 0, > > sizeof (struct grub_nilfs2_super_block), &sb2); > > /* Make sure if 2nd super block is valid. */ > > valid[1] =3D grub_nilfs2_valid_sb (&sb2); > > > > > > =20 >=20 >=20 > --=20 > Regards > Vladimir '=F6-coder/phcoder' Serbinenko >=20 >=20 > [1.2 OpenPGP digital signature ] >=20 > [2 ] > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel --=20 Jiro SEKIBA