aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-04-10 04:59:15 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-05-09 22:32:31 -0400
commit50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7 (patch)
tree3a91f6af1396f377a3bced903d605feb9b811b15 /fs/nilfs2/segment.c
parent9f130263f30233a44a3175db3218dd89af143d64 (diff)
nilfs2: insert checkpoint number in segment summary header
This adds a field to record the latest checkpoint number in the nilfs_segment_summary structure. This will help to recover the latest checkpoint number from logs on disk. This field is intended for crucial cases in which super blocks have lost pointer to the latest log. Even though this will change the disk format, both backward and forward compatibility is preserved by a size field prepared in the segment summary header. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index a17bfa193e3f..9f50fde0cd06 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -366,7 +366,8 @@ static int nilfs_segctor_reset_segment_buffer(struct nilfs_sc_info *sci)
366 366
367 if (nilfs_doing_gc()) 367 if (nilfs_doing_gc())
368 flags = NILFS_SS_GC; 368 flags = NILFS_SS_GC;
369 err = nilfs_segbuf_reset(segbuf, flags, sci->sc_seg_ctime); 369 err = nilfs_segbuf_reset(segbuf, flags, sci->sc_seg_ctime,
370 sci->sc_sbi->s_nilfs->ns_cno);
370 if (unlikely(err)) 371 if (unlikely(err))
371 return err; 372 return err;
372 373