diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-04-10 17:59:15 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-05-10 11:32:31 +0900 |
commit | 50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7 (patch) | |
tree | 3a91f6af1396f377a3bced903d605feb9b811b15 /fs/nilfs2/segbuf.h | |
parent | 9f130263f30233a44a3175db3218dd89af143d64 (diff) | |
download | linux-3.10-50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7.tar.gz linux-3.10-50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7.tar.bz2 linux-3.10-50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7.zip |
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/segbuf.h')
-rw-r--r-- | fs/nilfs2/segbuf.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h index e21497f61b0..fdf1c3b6d67 100644 --- a/fs/nilfs2/segbuf.h +++ b/fs/nilfs2/segbuf.h @@ -37,6 +37,7 @@ * @sumbytes: Byte count of segment summary * @nfileblk: Total number of file blocks * @seg_seq: Segment sequence number + * @cno: Checkpoint number * @ctime: Creation time * @next: Block number of the next full segment */ @@ -48,6 +49,7 @@ struct nilfs_segsum_info { unsigned long sumbytes; unsigned long nfileblk; u64 seg_seq; + __u64 cno; time_t ctime; sector_t next; }; @@ -135,7 +137,7 @@ void nilfs_segbuf_map_cont(struct nilfs_segment_buffer *segbuf, struct nilfs_segment_buffer *prev); void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *, __u64, struct the_nilfs *); -int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned, time_t); +int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned, time_t, __u64); int nilfs_segbuf_extend_segsum(struct nilfs_segment_buffer *); int nilfs_segbuf_extend_payload(struct nilfs_segment_buffer *, struct buffer_head **); |