mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
1cb2d38cb3
commit
6c6de1aa65
3 changed files with 6 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue