diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-04-30 18:56:12 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2011-05-10 22:21:44 +0900 |
commit | 6c6de1aa65189c37cc3c9af78da756c06a99899b (patch) | |
tree | 13f6d4a90d81357d581b80b8e400bd0b53b0a3e7 /fs/nilfs2/segment.c | |
parent | 1cb2d38cb3e59d58e8321a0592e84b5761afb063 (diff) | |
download | op-kernel-dev-6c6de1aa65189c37cc3c9af78da756c06a99899b.zip op-kernel-dev-6c6de1aa65189c37cc3c9af78da756c06a99899b.tar.gz |
nilfs2: super root size should change depending on inode size
The size of super root structure depends on inode size, so
NILFS_SR_BYTES macro should be a function of the inode size. This
fixes the issue.
Even though a different size value will be written for a possible
future filesystem with extended inode, but fortunately this does not
break disk format compatibility.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index abbfab9..8006d0c 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c @@ -894,7 +894,7 @@ static void nilfs_segctor_fill_in_super_root(struct nilfs_sc_info *sci, bh_sr = NILFS_LAST_SEGBUF(&sci->sc_segbufs)->sb_super_root; raw_sr = (struct nilfs_super_root *)bh_sr->b_data; - raw_sr->sr_bytes = cpu_to_le16(NILFS_SR_BYTES); + raw_sr->sr_bytes = cpu_to_le16(NILFS_SR_BYTES(isz)); raw_sr->sr_nongc_ctime = cpu_to_le64(nilfs_doing_gc() ? nilfs->ns_nongc_ctime : sci->sc_seg_ctime); |