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>
This commit is contained in:
@@ -363,14 +363,10 @@ int nilfs_attach_checkpoint(struct nilfs_sb_info *sbi, __u64 cno)
|
||||
list_add(&sbi->s_list, &nilfs->ns_supers);
|
||||
up_write(&nilfs->ns_super_sem);
|
||||
|
||||
sbi->s_ifile = nilfs_mdt_new(nilfs, sbi->s_super, NILFS_IFILE_INO, 0);
|
||||
sbi->s_ifile = nilfs_ifile_new(sbi, nilfs->ns_inode_size);
|
||||
if (!sbi->s_ifile)
|
||||
return -ENOMEM;
|
||||
|
||||
err = nilfs_palloc_init_blockgroup(sbi->s_ifile, nilfs->ns_inode_size);
|
||||
if (unlikely(err))
|
||||
goto failed;
|
||||
|
||||
down_read(&nilfs->ns_segctor_sem);
|
||||
err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, cno, 0, &raw_cp,
|
||||
&bh_cp);
|
||||
|
Reference in New Issue
Block a user