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
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel