From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OEPY9-0001j2-Tt for mharc-grub-devel@gnu.org; Tue, 18 May 2010 12:21:45 -0400 Received: from [140.186.70.92] (port=48578 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEPY2-0001gH-RG for grub-devel@gnu.org; Tue, 18 May 2010 12:21:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEPY1-0005CB-2s for grub-devel@gnu.org; Tue, 18 May 2010 12:21:38 -0400 Received: from ey-out-1920.google.com ([74.125.78.145]:45547) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEPXy-0005BV-Gp for grub-devel@gnu.org; Tue, 18 May 2010 12:21:36 -0400 Received: by ey-out-1920.google.com with SMTP id 13so787652eye.34 for ; Tue, 18 May 2010 09:21:33 -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=9r/gwcL4HBgkCOGDNihe0HUSvTCk2xE6tYoLupbs9dA=; b=pBKAPZdYhEaPyjo6XxeFkpoXSC2GEqowJJi/rCbsZLO72sHQ+sDXAIhscWmkKBZ7PT c15V4sKe4ohEMDt4QBVeAaT3eTM4eAT89yPgkVmzMA+CsSTOOH34GPyd/b11TsMq9uhL iOnoTGJ/mslVxDke8dYNE05WkIEw/5lLjlKzw= 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=Jr1uO6YpJRg+ZRv1T7QKiEfKlf72eGvfPPb8KIgkkm0BCs8XgrR+1QDWgvJqpVUl8e 0L3Scbua67MLN6I43jMqgcn5OQZcgm2oa/KikPfp8S+vYpcib7oQfaiuPkV76Lz3Dmax ByPtyQTga+s902b0XQQZMtjunkuQmLjB2WDkM= Received: by 10.213.48.148 with SMTP id r20mr3236015ebf.42.1274199692281; Tue, 18 May 2010 09:21:32 -0700 (PDT) Received: from debian.bg45.phnet (gprs31.swisscom-mobile.ch [193.247.250.31]) by mx.google.com with ESMTPS id 13sm3122771ewy.1.2010.05.18.09.21.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 18 May 2010 09:21:31 -0700 (PDT) Message-ID: <4BF2BE7E.3090701@gmail.com> Date: Tue, 18 May 2010 18:21:18 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: The development of GNU GRUB References: <87r5lhi4u4.wl%jir@sekiba.com> In-Reply-To: <87r5lhi4u4.wl%jir@sekiba.com> X-Enigmail-Version: 0.95.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig8502344B17A09859AC165248" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH]add supporting second super block of nilfs2 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, 18 May 2010 16:21:45 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig8502344B17A09859AC165248 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Jiro SEKIBA wrote: > Hi, > > This is a patch to support second super block of nilfs2. > It will use the second super block when first one is accidentally > collapsed or not synced properly. > > =20 Is it limited to only 2 blocks? > NILFS has redundant super blocks. Those are identical if unmounted cle= anly. > However when one of these is collapsed or old, correct one or newer one= > should be used to find latest log correctly. > > Test on both PPC and x86. > > =20 + grub_disk_read (disk, 1 * 2, 0, sizeof (struct grub_nilfs2_super_block= ), + &data->sblock); Please macroify + grub_disk_read (disk, (disk->total_sectors - 8), 0, + sizeof (struct grub_nilfs2_super_block), &sb2); total_sectors is a size of disk, not partition. Use grub_disk_get_size to= automatically get the size of underlying object (disk or partition). Some disks have unknown size. CDROM is an example of it. Even worse tryin= g to read from a sector past the boundary will hang the system for few mi= nutes. Disks on OFW suffer the same problem. Perhaps we should add GRUB_DISK_SIZ= E_UNKNOWN 0xffffffffffffffffULL for this case as an indicator and avoid querying back labels of such disks + /* Swap if first super block is invalid or oloder than second one. */ Typo Could you supply the ChangeLog entry? --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig8502344B17A09859AC165248 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 iF4EAREKAAYFAkvyvoUACgkQNak7dOguQgm1kAD9HFWCeX/0d4NSyZha6aHV3uVw 5UHfhyK0HhLkH8OO7GAA/iGMAHfNrCb6uNOFmmV7Ge2yMxeMi3nJBcnyitru89Q2 =6nEj -----END PGP SIGNATURE----- --------------enig8502344B17A09859AC165248--