* fs/nilfs2.c: fix macro NILFS_2ND_SUPER_BLOCK to calculate
2nd superblock position from partition size.
This commit is contained in:
parent
e4f4eafc91
commit
811b0dcab8
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2010-07-13 Jiro SEKIBA <jir@unicus.jp>
|
||||||
|
|
||||||
|
* fs/nilfs2.c: fix macro NILFS_2ND_SUPER_BLOCK to calculate
|
||||||
|
2nd superblock position from partition size.
|
||||||
|
|
||||||
2010-07-10 Colin Watson <cjwatson@ubuntu.com>
|
2010-07-10 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
* Makefile.in (MAINTAINER_CLEANFILES): Remove
|
* Makefile.in (MAINTAINER_CLEANFILES): Remove
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
/* nilfs 1st super block posission from beginning of the partition
|
/* nilfs 1st super block posission from beginning of the partition
|
||||||
in 512 block size */
|
in 512 block size */
|
||||||
#define NILFS_1ST_SUPER_BLOCK 2
|
#define NILFS_1ST_SUPER_BLOCK 2
|
||||||
/* nilfs 2nd super block posission from end of the partition
|
/* nilfs 2nd super block posission from beginning of the partition
|
||||||
in 512 block size */
|
in 512 block size */
|
||||||
#define NILFS_2ND_SUPER_BLOCK 8
|
#define NILFS_2ND_SUPER_BLOCK(devsize) (((devsize >> 3) - 1) << 3)
|
||||||
|
|
||||||
struct grub_nilfs2_inode
|
struct grub_nilfs2_inode
|
||||||
{
|
{
|
||||||
|
@ -729,7 +729,7 @@ grub_nilfs2_load_sb (struct grub_nilfs2_data *data)
|
||||||
if (partition_size != GRUB_DISK_SIZE_UNKNOWN)
|
if (partition_size != GRUB_DISK_SIZE_UNKNOWN)
|
||||||
{
|
{
|
||||||
/* Read second super block. */
|
/* Read second super block. */
|
||||||
grub_disk_read (disk, partition_size - NILFS_2ND_SUPER_BLOCK, 0,
|
grub_disk_read (disk, NILFS_2ND_SUPER_BLOCK (partition_size), 0,
|
||||||
sizeof (struct grub_nilfs2_super_block), &sb2);
|
sizeof (struct grub_nilfs2_super_block), &sb2);
|
||||||
/* Make sure if 2nd super block is valid. */
|
/* Make sure if 2nd super block is valid. */
|
||||||
valid[1] = grub_nilfs2_valid_sb (&sb2);
|
valid[1] = grub_nilfs2_valid_sb (&sb2);
|
||||||
|
|
Loading…
Reference in a new issue