aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.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/segment.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/segment.h')
-rw-r--r--fs/nilfs2/segment.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h
index bb7d417fec62..4a64eb82f1f5 100644
--- a/fs/nilfs2/segment.h
+++ b/fs/nilfs2/segment.h
@@ -90,7 +90,6 @@ struct nilfs_segsum_pointer {
90 * @sc_nblk_inc: Block count of current generation 90 * @sc_nblk_inc: Block count of current generation
91 * @sc_dirty_files: List of files to be written 91 * @sc_dirty_files: List of files to be written
92 * @sc_gc_inodes: List of GC inodes having blocks to be written 92 * @sc_gc_inodes: List of GC inodes having blocks to be written
93 * @sc_active_segments: List of active segments that were already written out
94 * @sc_cleaning_segments: List of segments to be freed through construction 93 * @sc_cleaning_segments: List of segments to be freed through construction
95 * @sc_copied_buffers: List of copied buffers (buffer heads) to freeze data 94 * @sc_copied_buffers: List of copied buffers (buffer heads) to freeze data
96 * @sc_dsync_inode: inode whose data pages are written for a sync operation 95 * @sc_dsync_inode: inode whose data pages are written for a sync operation
@@ -132,7 +131,6 @@ struct nilfs_sc_info {
132 131
133 struct list_head sc_dirty_files; 132 struct list_head sc_dirty_files;
134 struct list_head sc_gc_inodes; 133 struct list_head sc_gc_inodes;
135 struct list_head sc_active_segments;
136 struct list_head sc_cleaning_segments; 134 struct list_head sc_cleaning_segments;
137 struct list_head sc_copied_buffers; 135 struct list_head sc_copied_buffers;
138 136
@@ -232,8 +230,7 @@ extern int nilfs_segctor_add_segments_to_be_freed(struct nilfs_sc_info *,
232 __u64 *, size_t); 230 __u64 *, size_t);
233extern void nilfs_segctor_clear_segments_to_be_freed(struct nilfs_sc_info *); 231extern void nilfs_segctor_clear_segments_to_be_freed(struct nilfs_sc_info *);
234 232
235extern int nilfs_attach_segment_constructor(struct nilfs_sb_info *, 233extern int nilfs_attach_segment_constructor(struct nilfs_sb_info *);
236 struct nilfs_recovery_info *);
237extern void nilfs_detach_segment_constructor(struct nilfs_sb_info *); 234extern void nilfs_detach_segment_constructor(struct nilfs_sb_info *);
238 235
239/* recovery.c */ 236/* recovery.c */