diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-09-04 21:14:43 -0400 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-22 20:24:37 -0400 |
commit | adbb39b5485b72dca963a2bc9b1b22bfc19d4967 (patch) | |
tree | 7c28b2011ee35b2407140de15381d9c417755dd9 /fs/nilfs2 | |
parent | 518d1a6a1d6610a014875a2fe3252e89b6260d2f (diff) |
nilfs2: do not allocate nilfs_mdt_info structure to gc-inodes
GC-inode now doesn't need the nilfs_mdt_info structure and there is no
reason that it is a sort of metadata files.
This stops the allocation and makes them not dependent on metadata
file routines.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2')
-rw-r--r-- | fs/nilfs2/gcinode.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/nilfs2/gcinode.c b/fs/nilfs2/gcinode.c index 34f8f84a22e3..33ad25ddd5c4 100644 --- a/fs/nilfs2/gcinode.c +++ b/fs/nilfs2/gcinode.c | |||
@@ -168,7 +168,7 @@ int nilfs_gccache_wait_and_mark_dirty(struct buffer_head *bh) | |||
168 | } | 168 | } |
169 | nilfs_btnode_mark_dirty(bh); | 169 | nilfs_btnode_mark_dirty(bh); |
170 | } else { | 170 | } else { |
171 | nilfs_mdt_mark_buffer_dirty(bh); | 171 | nilfs_mark_buffer_dirty(bh); |
172 | } | 172 | } |
173 | return 0; | 173 | return 0; |
174 | } | 174 | } |
@@ -177,24 +177,24 @@ int nilfs_init_gcinode(struct inode *inode) | |||
177 | { | 177 | { |
178 | struct nilfs_inode_info *ii = NILFS_I(inode); | 178 | struct nilfs_inode_info *ii = NILFS_I(inode); |
179 | struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs; | 179 | struct the_nilfs *nilfs = NILFS_SB(inode->i_sb)->s_nilfs; |
180 | int ret; | ||
181 | 180 | ||
182 | ret = nilfs_mdt_init(inode, nilfs, GFP_NOFS, 0); | 181 | inode->i_mode = S_IFREG; |
183 | if (!ret) { | 182 | mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); |
184 | inode->i_mapping->a_ops = &def_gcinode_aops; | 183 | inode->i_mapping->a_ops = &def_gcinode_aops; |
184 | inode->i_mapping->backing_dev_info = inode->i_sb->s_bdi; | ||
185 | 185 | ||
186 | ii->i_flags = 0; | 186 | ii->i_flags = 0; |
187 | nilfs_bmap_init_gc(ii->i_bmap); | 187 | nilfs_bmap_init_gc(ii->i_bmap); |
188 | 188 | ||
189 | /* | 189 | /* |
190 | * Add the inode to GC inode list. Garbage Collection | 190 | * Add the inode to GC inode list. Garbage Collection |
191 | * is serialized and no two processes manipulate the | 191 | * is serialized and no two processes manipulate the |
192 | * list simultaneously. | 192 | * list simultaneously. |
193 | */ | 193 | */ |
194 | igrab(inode); | 194 | igrab(inode); |
195 | list_add(&NILFS_I(inode)->i_dirty, &nilfs->ns_gc_inodes); | 195 | list_add(&NILFS_I(inode)->i_dirty, &nilfs->ns_gc_inodes); |
196 | } | 196 | |
197 | return ret; | 197 | return 0; |
198 | } | 198 | } |
199 | 199 | ||
200 | /** | 200 | /** |