diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-08-14 00:07:15 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-22 20:24:35 -0400 |
commit | e912a5b66837ee89fb025e67b5efeaa11930c2ce (patch) | |
tree | 46209cdf7417863024131ff54f56120e43ae7a7b /fs/nilfs2/segment.h | |
parent | 8e656fd518784b49453f60c5f78b78703bc85cb2 (diff) |
nilfs2: use root object to get ifile
This rewrites functions using ifile so that they get ifile from
nilfs_root object, and will remove sbi->s_ifile. Some functions that
don't know the root object are extended to receive it from caller.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.h')
-rw-r--r-- | fs/nilfs2/segment.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h index 675d932148a4..cd8056e7cbed 100644 --- a/fs/nilfs2/segment.h +++ b/fs/nilfs2/segment.h | |||
@@ -29,6 +29,8 @@ | |||
29 | #include <linux/nilfs2_fs.h> | 29 | #include <linux/nilfs2_fs.h> |
30 | #include "sb.h" | 30 | #include "sb.h" |
31 | 31 | ||
32 | struct nilfs_root; | ||
33 | |||
32 | /** | 34 | /** |
33 | * struct nilfs_recovery_info - Recovery information | 35 | * struct nilfs_recovery_info - Recovery information |
34 | * @ri_need_recovery: Recovery status | 36 | * @ri_need_recovery: Recovery status |
@@ -87,6 +89,7 @@ struct nilfs_segsum_pointer { | |||
87 | * struct nilfs_sc_info - Segment constructor information | 89 | * struct nilfs_sc_info - Segment constructor information |
88 | * @sc_super: Back pointer to super_block struct | 90 | * @sc_super: Back pointer to super_block struct |
89 | * @sc_sbi: Back pointer to nilfs_sb_info struct | 91 | * @sc_sbi: Back pointer to nilfs_sb_info struct |
92 | * @sc_root: root object of the current filesystem tree | ||
90 | * @sc_nblk_inc: Block count of current generation | 93 | * @sc_nblk_inc: Block count of current generation |
91 | * @sc_dirty_files: List of files to be written | 94 | * @sc_dirty_files: List of files to be written |
92 | * @sc_gc_inodes: List of GC inodes having blocks to be written | 95 | * @sc_gc_inodes: List of GC inodes having blocks to be written |
@@ -129,6 +132,7 @@ struct nilfs_segsum_pointer { | |||
129 | struct nilfs_sc_info { | 132 | struct nilfs_sc_info { |
130 | struct super_block *sc_super; | 133 | struct super_block *sc_super; |
131 | struct nilfs_sb_info *sc_sbi; | 134 | struct nilfs_sb_info *sc_sbi; |
135 | struct nilfs_root *sc_root; | ||
132 | 136 | ||
133 | unsigned long sc_nblk_inc; | 137 | unsigned long sc_nblk_inc; |
134 | 138 | ||
@@ -231,7 +235,8 @@ extern void nilfs_flush_segment(struct super_block *, ino_t); | |||
231 | extern int nilfs_clean_segments(struct super_block *, struct nilfs_argv *, | 235 | extern int nilfs_clean_segments(struct super_block *, struct nilfs_argv *, |
232 | void **); | 236 | void **); |
233 | 237 | ||
234 | extern int nilfs_attach_segment_constructor(struct nilfs_sb_info *); | 238 | int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi, |
239 | struct nilfs_root *root); | ||
235 | extern void nilfs_detach_segment_constructor(struct nilfs_sb_info *); | 240 | extern void nilfs_detach_segment_constructor(struct nilfs_sb_info *); |
236 | 241 | ||
237 | /* recovery.c */ | 242 | /* recovery.c */ |