[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: |
Jiro SEKIBA |
Subject: |
Re: [PATCH]add supporting second super block of nilfs2 |
Date: |
Sun, 23 May 2010 20:59:15 +0900 |
User-agent: |
Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.7 Emacs/22.3 (i486-pc-linux-gnu) MULE/5.0 (SAKAKI) |
Hi,
Thank you for the comments.
At Tue, 18 May 2010 18:21:18 +0200,
Vladimir 'φ-coder/phcoder' Serbinenko wrote:
>
> 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?
Yes, nilfs2 has super blocks at the beginning and the end of the partition.
> > 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
Thank you the correction.
I fixed to use grub_disk_get_size() to obtain the size.
Also, I added the macro in grub/disk.h for the case that size
of partition is unknown.
> 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
>
>
--
Jiro SEKIBA <address@hidden>
nilfs2-support-2nd-sbv2.patch
Description: Text document