Grub Development Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [PATCH]add supporting second super block of nilfs2
Date: Tue, 18 May 2010 18:21:18 +0200	[thread overview]
Message-ID: <4BF2BE7E.3090701@gmail.com> (raw)
In-Reply-To: <87r5lhi4u4.wl%jir@sekiba.com>

[-- Attachment #1: Type: text/plain, Size: 1376 bytes --]

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.
>
>   
Is it limited to only 2 blocks?
> NILFS has redundant super blocks.  Those are identical if unmounted cleanly.
> 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.
>
>   

+  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 trying to read from a sector past the boundary will hang the system for few minutes.
Disks on OFW suffer the same problem. Perhaps we should add GRUB_DISK_SIZE_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?

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

  reply	other threads:[~2010-05-18 16:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-12 14:15 [PATCH]add supporting second super block of nilfs2 Jiro SEKIBA
2010-05-18 16:21 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-05-23 11:59   ` Jiro SEKIBA
2010-05-24  2:48     ` Jiro SEKIBA
2010-05-24 11:06       ` Jiro SEKIBA
2010-05-31 18:50         ` Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BF2BE7E.3090701@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox