diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-12 09:56:43 -0500 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-11-19 20:05:48 -0500 |
commit | 79739565e15f2adbc482207a0800fc127c84d1a0 (patch) | |
tree | 10d61f5a31e4de5c90a6c9c10f0f0bc8e68d1550 /fs/nilfs2/super.c | |
parent | 5731e191f254af9135ad843119804a500528ecf3 (diff) |
nilfs2: separate constructor of metadata files
This will displace nilfs_mdt_new() constructor with individual
metadata file constructors like nilfs_dat_new(), new_sufile_new(),
nilfs_cpfile_new(), and nilfs_ifile_new().
This makes it possible for each metadata file to have own
intialization code.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 77f2e47ff81c..05ae52a482c6 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c | |||
@@ -363,14 +363,10 @@ int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno) | |||
363 | list_add(&sbi->s_list, &nilfs->ns_supers); | 363 | list_add(&sbi->s_list, &nilfs->ns_supers); |
364 | up_write(&nilfs->ns_super_sem); | 364 | up_write(&nilfs->ns_super_sem); |
365 | 365 | ||
366 | sbi->s_ifile = nilfs_mdt_new(nilfs, sbi->s_super, NILFS_IFILE_INO, 0); | 366 | sbi->s_ifile = nilfs_ifile_new(sbi, nilfs->ns_inode_size); |
367 | if (!sbi->s_ifile) | 367 | if (!sbi->s_ifile) |
368 | return -ENOMEM; | 368 | return -ENOMEM; |
369 | 369 | ||
370 | err = nilfs_palloc_init_blockgroup(sbi->s_ifile, nilfs->ns_inode_size); | ||
371 | if (unlikely(err)) | ||
372 | goto failed; | ||
373 | |||
374 | down_read(&nilfs->ns_segctor_sem); | 370 | down_read(&nilfs->ns_segctor_sem); |
375 | err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, cno, 0, &raw_cp, | 371 | err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, cno, 0, &raw_cp, |
376 | &bh_cp); | 372 | &bh_cp); |