From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OYSAe-0005IV-KD for mharc-grub-devel@gnu.org; Mon, 12 Jul 2010 19:12:20 -0400 Received: from [140.186.70.92] (port=46528 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OYSAc-0005H7-7I for grub-devel@gnu.org; Mon, 12 Jul 2010 19:12:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OYSAa-0000qG-Om for grub-devel@gnu.org; Mon, 12 Jul 2010 19:12:18 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:42558) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OYSAa-0000q9-J3 for grub-devel@gnu.org; Mon, 12 Jul 2010 19:12:16 -0400 Received: by bwz9 with SMTP id 9so3388066bwz.0 for ; Mon, 12 Jul 2010 16:12:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :x-enigmail-version:content-type; bh=5XGFuWTyYMwqgDiG34IBKW+046HqRZsWGXCb8zGxwQk=; b=MgNnmS4yKOnEhI9fah6xkAg9UrxenTmBTq1rc7pANyP719VOsEwrgmNJ8Yf6Lj/ohS QUXDWyI9tNkdJ2x5L7oWUeJzkm+lho0wUsLYzmXGFqwW1kN2IN45aBbZL6ZUrr/5fjtv yhVTHd9rBgCcVW0eNADr4gspgIUmJJfsHcE4o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; b=UKJQKJixNZskWDMVtse6ZwfAHz3ox6TIoKTak//ke7ARampssLLtHnoLWKO/FXtGeS tC10L4sqEtxwzvdMnKF8nhERVPt+dHneWKnyS7nbyTgxxhqqPS3mUf1vwhptlK7mjxCj N9wQcDJ8rXnXD6Ote0P8k1sNowE+Mk0KRvhVI= Received: by 10.204.134.156 with SMTP id j28mr11287152bkt.10.1278976335487; Mon, 12 Jul 2010 16:12:15 -0700 (PDT) Received: from debian.bg45.phnet (vpn-global-dhcp1-64.ethz.ch [129.132.208.64]) by mx.google.com with ESMTPS id 24sm20668412bkr.19.2010.07.12.16.12.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 12 Jul 2010 16:12:14 -0700 (PDT) Message-ID: <4C3BA145.8020002@gmail.com> Date: Tue, 13 Jul 2010 01:12:05 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100620 Icedove/3.0.5 MIME-Version: 1.0 To: grub-devel@gnu.org References: <87pqyzwmf5.wl%jir@sekiba.com> In-Reply-To: <87pqyzwmf5.wl%jir@sekiba.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig6CD1556243E3F3ECAAA3BF5D" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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: Mon, 12 Jul 2010 23:12:19 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig6CD1556243E3F3ECAAA3BF5D Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 > =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 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig6CD1556243E3F3ECAAA3BF5D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAkw7oUUACgkQNak7dOguQgkE0wD7BF2EIzFJ/tWGSZr3jWr3i4s8 bbS9S2vgrJIBgPa4tfQA/jMx3YyFR9B/bKOQdKqw88vCGBC7h9Y69LyC/EoD6tKs =f4GV -----END PGP SIGNATURE----- --------------enig6CD1556243E3F3ECAAA3BF5D--