aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/the_nilfs.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-08-28 23:44:56 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-10-22 20:24:38 -0400
commitc1c1d7092072093ad960db2f6c08f06705c57fa4 (patch)
tree115796528882ed5d8d21258ad8cf481765a5035a /fs/nilfs2/the_nilfs.c
parentb1f6a4f294088b3fcf9ae67915ca550a1ded2819 (diff)
nilfs2: get rid of GCDAT inode
This applies prepared rollback function and redirect function of metadata file to DAT file, and eliminates GCDAT inode. Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/the_nilfs.c')
-rw-r--r--fs/nilfs2/the_nilfs.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c
index 6eeb4f072f83..b7666bc04256 100644
--- a/fs/nilfs2/the_nilfs.c
+++ b/fs/nilfs2/the_nilfs.c
@@ -96,7 +96,6 @@ void destroy_nilfs(struct the_nilfs *nilfs)
96 nilfs_mdt_destroy(nilfs->ns_sufile); 96 nilfs_mdt_destroy(nilfs->ns_sufile);
97 nilfs_mdt_destroy(nilfs->ns_cpfile); 97 nilfs_mdt_destroy(nilfs->ns_cpfile);
98 nilfs_mdt_destroy(nilfs->ns_dat); 98 nilfs_mdt_destroy(nilfs->ns_dat);
99 nilfs_mdt_destroy(nilfs->ns_gc_dat);
100 } 99 }
101 if (nilfs_init(nilfs)) { 100 if (nilfs_init(nilfs)) {
102 brelse(nilfs->ns_sbh[0]); 101 brelse(nilfs->ns_sbh[0]);
@@ -131,20 +130,14 @@ static int nilfs_load_super_root(struct the_nilfs *nilfs, sector_t sr_block)
131 if (unlikely(!nilfs->ns_dat)) 130 if (unlikely(!nilfs->ns_dat))
132 goto failed; 131 goto failed;
133 132
134 nilfs->ns_gc_dat = nilfs_dat_new(nilfs, dat_entry_size);
135 if (unlikely(!nilfs->ns_gc_dat))
136 goto failed_dat;
137
138 nilfs->ns_cpfile = nilfs_cpfile_new(nilfs, checkpoint_size); 133 nilfs->ns_cpfile = nilfs_cpfile_new(nilfs, checkpoint_size);
139 if (unlikely(!nilfs->ns_cpfile)) 134 if (unlikely(!nilfs->ns_cpfile))
140 goto failed_gc_dat; 135 goto failed_dat;
141 136
142 nilfs->ns_sufile = nilfs_sufile_new(nilfs, segment_usage_size); 137 nilfs->ns_sufile = nilfs_sufile_new(nilfs, segment_usage_size);
143 if (unlikely(!nilfs->ns_sufile)) 138 if (unlikely(!nilfs->ns_sufile))
144 goto failed_cpfile; 139 goto failed_cpfile;
145 140
146 nilfs_mdt_set_shadow(nilfs->ns_dat, nilfs->ns_gc_dat);
147
148 err = nilfs_dat_read(nilfs->ns_dat, (void *)bh_sr->b_data + 141 err = nilfs_dat_read(nilfs->ns_dat, (void *)bh_sr->b_data +
149 NILFS_SR_DAT_OFFSET(inode_size)); 142 NILFS_SR_DAT_OFFSET(inode_size));
150 if (unlikely(err)) 143 if (unlikely(err))
@@ -173,9 +166,6 @@ static int nilfs_load_super_root(struct the_nilfs *nilfs, sector_t sr_block)
173 failed_cpfile: 166 failed_cpfile:
174 nilfs_mdt_destroy(nilfs->ns_cpfile); 167 nilfs_mdt_destroy(nilfs->ns_cpfile);
175 168
176 failed_gc_dat:
177 nilfs_mdt_destroy(nilfs->ns_gc_dat);
178
179 failed_dat: 169 failed_dat:
180 nilfs_mdt_destroy(nilfs->ns_dat); 170 nilfs_mdt_destroy(nilfs->ns_dat);
181 goto failed; 171 goto failed;
@@ -371,7 +361,6 @@ int load_nilfs(struct the_nilfs *nilfs, struct nilfs_sb_info *sbi)
371 nilfs_mdt_destroy(nilfs->ns_cpfile); 361 nilfs_mdt_destroy(nilfs->ns_cpfile);
372 nilfs_mdt_destroy(nilfs->ns_sufile); 362 nilfs_mdt_destroy(nilfs->ns_sufile);
373 nilfs_mdt_destroy(nilfs->ns_dat); 363 nilfs_mdt_destroy(nilfs->ns_dat);
374 nilfs_mdt_destroy(nilfs->ns_gc_dat);
375 364
376 failed: 365 failed:
377 nilfs_clear_recovery_info(&ri); 366 nilfs_clear_recovery_info(&ri);