first superblock to find the second one when possible.
+2012-01-25 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Use device size from
+ first superblock to find the second one when possible.
+
2012-01-25 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-install.in: Fix an ARC bug.
/* Make sure if 1st super block is valid. */
valid[0] = grub_nilfs2_valid_sb (&data->sblock);
- partition_size = grub_disk_get_size (disk);
+ if (valid[0])
+ partition_size = (grub_le_to_cpu64 (data->sblock.s_dev_size)
+ >> GRUB_DISK_SECTOR_BITS);
+ else
+ partition_size = grub_disk_get_size (disk);
if (partition_size != GRUB_DISK_SIZE_UNKNOWN)
{
/* Read second super block. */