Lines Matching defs:nilfs
50 #include "nilfs.h"
185 * @nilfs - the_nilfs
190 int nilfs_init_gccache(struct the_nilfs *nilfs)
194 BUG_ON(nilfs->ns_gc_inodes_h);
196 INIT_LIST_HEAD(&nilfs->ns_gc_inodes);
198 nilfs->ns_gc_inodes_h =
201 if (nilfs->ns_gc_inodes_h == NULL)
205 INIT_HLIST_HEAD(&nilfs->ns_gc_inodes_h[loop]);
211 * @nilfs - the nilfs
213 void nilfs_destroy_gccache(struct the_nilfs *nilfs)
215 if (nilfs->ns_gc_inodes_h) {
216 nilfs_remove_all_gcinode(nilfs);
217 kfree(nilfs->ns_gc_inodes_h);
218 nilfs->ns_gc_inodes_h = NULL;
222 static struct inode *alloc_gcinode(struct the_nilfs *nilfs, ino_t ino,
228 inode = nilfs_mdt_new_common(nilfs, NULL, ino, GFP_NOFS, 0);
255 struct inode *nilfs_gc_iget(struct the_nilfs *nilfs, ino_t ino, __u64 cno)
257 struct hlist_head *head = nilfs->ns_gc_inodes_h + ihash(ino, cno);
266 inode = alloc_gcinode(nilfs, ino, cno);
269 list_add(&NILFS_I(inode)->i_dirty, &nilfs->ns_gc_inodes);
285 void nilfs_remove_all_gcinode(struct the_nilfs *nilfs)
287 struct hlist_head *head = nilfs->ns_gc_inodes_h;