[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH]add supporting second super block of nilfs2

From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH]add supporting second super block of nilfs2
Date: Tue, 18 May 2010 18:21:18 +0200
User-agent: Mozilla-Thunderbird (X11/20091109)

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. */


Could you supply the ChangeLog entry?

Vladimir 'φ-coder/phcoder' Serbinenko

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]