aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segbuf.h
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2009-04-06 22:01:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-07 11:31:20 -0400
commitcece552074c591970353ad48308d65f110aeaf28 (patch)
tree2dcca7913d38df89711504f5daeecccfedb5a3eb /fs/nilfs2/segbuf.h
parentc96fa464a567a2a8796009af0e79bc68af73f485 (diff)
nilfs2: simplify handling of active state of segments
will reduce some lines of segment constructor. Previously, the state was complexly controlled through a list of segments in order to keep consistency in meta data of usage state of segments. Instead, this presents ``calculated'' active flags to userland cleaner program and stop maintaining its real flag on disk. Only by this fake flag, the cleaner cannot exactly know if each segment is reclaimable or not. However, the recent extension of nilfs_sustat ioctl struct (nilfs2-extend-nilfs_sustat-ioctl-struct.patch) can prevent the cleaner from reclaiming in-use segment wrongly. So, now I can apply this for simplification. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/segbuf.h')
-rw-r--r--fs/nilfs2/segbuf.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h
index 25f2a5faa483..0c3076f4e592 100644
--- a/fs/nilfs2/segbuf.h
+++ b/fs/nilfs2/segbuf.h
@@ -68,7 +68,6 @@ struct nilfs_segsum_info {
68 * struct nilfs_segment_buffer - Segment buffer 68 * struct nilfs_segment_buffer - Segment buffer
69 * @sb_super: back pointer to a superblock struct 69 * @sb_super: back pointer to a superblock struct
70 * @sb_list: List head to chain this structure 70 * @sb_list: List head to chain this structure
71 * @sb_segent: Pointer for attaching a segment entry
72 * @sb_sum: On-memory segment summary 71 * @sb_sum: On-memory segment summary
73 * @sb_segnum: Index number of the full segment 72 * @sb_segnum: Index number of the full segment
74 * @sb_nextnum: Index number of the next full segment 73 * @sb_nextnum: Index number of the next full segment
@@ -83,7 +82,6 @@ struct nilfs_segsum_info {
83struct nilfs_segment_buffer { 82struct nilfs_segment_buffer {
84 struct super_block *sb_super; 83 struct super_block *sb_super;
85 struct list_head sb_list; 84 struct list_head sb_list;
86 struct nilfs_segment_entry *sb_segent;
87 85
88 /* Segment information */ 86 /* Segment information */
89 struct nilfs_segsum_info sb_sum; 87 struct nilfs_segsum_info sb_sum;
@@ -125,8 +123,8 @@ int __init nilfs_init_segbuf_cache(void);
125void nilfs_destroy_segbuf_cache(void); 123void nilfs_destroy_segbuf_cache(void);
126struct nilfs_segment_buffer *nilfs_segbuf_new(struct super_block *); 124struct nilfs_segment_buffer *nilfs_segbuf_new(struct super_block *);
127void nilfs_segbuf_free(struct nilfs_segment_buffer *); 125void nilfs_segbuf_free(struct nilfs_segment_buffer *);
128int nilfs_segbuf_map(struct nilfs_segment_buffer *, __u64, unsigned long, 126void nilfs_segbuf_map(struct nilfs_segment_buffer *, __u64, unsigned long,
129 struct the_nilfs *); 127 struct the_nilfs *);
130void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *, __u64, 128void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *, __u64,
131 struct the_nilfs *); 129 struct the_nilfs *);
132int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned, time_t); 130int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned, time_t);