diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-04-10 04:59:15 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-05-09 22:32:31 -0400 |
commit | 50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7 (patch) | |
tree | 3a91f6af1396f377a3bced903d605feb9b811b15 /fs/nilfs2/recovery.c | |
parent | 9f130263f30233a44a3175db3218dd89af143d64 (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/recovery.c')
-rw-r--r-- | fs/nilfs2/recovery.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index ba43146f3c30..bae2a516b4ee 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c | |||
@@ -105,6 +105,8 @@ static void store_segsum_info(struct nilfs_segsum_info *ssi, | |||
105 | 105 | ||
106 | ssi->nsumblk = DIV_ROUND_UP(ssi->sumbytes, blocksize); | 106 | ssi->nsumblk = DIV_ROUND_UP(ssi->sumbytes, blocksize); |
107 | ssi->nfileblk = ssi->nblocks - ssi->nsumblk - !!NILFS_SEG_HAS_SR(ssi); | 107 | ssi->nfileblk = ssi->nblocks - ssi->nsumblk - !!NILFS_SEG_HAS_SR(ssi); |
108 | |||
109 | /* need to verify ->ss_bytes field if read ->ss_cno */ | ||
108 | } | 110 | } |
109 | 111 | ||
110 | /** | 112 | /** |