Lines Matching refs:sbi
109 static int find_in_level(struct f2fs_sb_info *sbi,struct f2fs_node *dir, in find_in_level() argument
142 get_dnode_of_data(sbi, &dn, bidx, LOOKUP_NODE); in find_in_level()
165 static int f2fs_find_entry(struct f2fs_sb_info *sbi, in f2fs_find_entry() argument
173 if (find_in_level(sbi, dir, level, de)) in f2fs_find_entry()
180 nid_t f2fs_lookup(struct f2fs_sb_info *sbi, struct f2fs_node *dir, in f2fs_lookup() argument
189 err = f2fs_find_entry(sbi, dir, &de); in f2fs_lookup()
219 int f2fs_add_link(struct f2fs_sb_info *sbi, struct f2fs_node *parent, in f2fs_add_link() argument
269 get_dnode_of_data(sbi, &dn, block, ALLOC_NODE); in f2fs_add_link()
272 new_data_block(sbi, dentry_blk, &dn, CURSEG_HOT_DATA); in f2fs_add_link()
332 static void make_empty_dir(struct f2fs_sb_info *sbi, struct f2fs_node *inode) in make_empty_dir() argument
342 get_node_info(sbi, ino, &ni); in make_empty_dir()
363 reserve_new_block(sbi, &blkaddr, &sum, CURSEG_HOT_DATA); in make_empty_dir()
372 static void page_symlink(struct f2fs_sb_info *sbi, struct f2fs_node *inode, in page_symlink() argument
382 get_node_info(sbi, ino, &ni); in page_symlink()
398 reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA); in page_symlink()
407 static void init_inode_block(struct f2fs_sb_info *sbi, in init_inode_block() argument
410 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); in init_inode_block()
472 make_empty_dir(sbi, node_blk); in init_inode_block()
474 page_symlink(sbi, node_blk, de->link, size); in init_inode_block()
481 int convert_inline_dentry(struct f2fs_sb_info *sbi, struct f2fs_node *node, in convert_inline_dentry() argument
512 get_dnode_of_data(sbi, &dn, 0, ALLOC_NODE); in convert_inline_dentry()
514 new_data_block(sbi, dentry_blk, &dn, CURSEG_HOT_DATA); in convert_inline_dentry()
536 make_empty_dir(sbi, node); in convert_inline_dentry()
563 ret = f2fs_add_link(sbi, node, filename, namelen, in convert_inline_dentry()
577 int f2fs_create(struct f2fs_sb_info *sbi, struct dentry *de) in f2fs_create() argument
586 get_node_info(sbi, de->pino, &ni); in f2fs_create()
599 ret = convert_inline_dentry(sbi, parent, ni.blk_addr); in f2fs_create()
605 ret = f2fs_find_entry(sbi, parent, de); in f2fs_create()
617 f2fs_alloc_nid(sbi, &de->ino, 1); in f2fs_create()
619 init_inode_block(sbi, child, de); in f2fs_create()
621 ret = f2fs_add_link(sbi, parent, child->i.i_name, in f2fs_create()
634 reserve_new_block(sbi, &blkaddr, &sum, CURSEG_HOT_NODE); in f2fs_create()
637 update_nat_blkaddr(sbi, de->ino, de->ino, blkaddr); in f2fs_create()
642 update_free_segments(sbi); in f2fs_create()
656 int f2fs_mkdir(struct f2fs_sb_info *sbi, struct dentry *de) in f2fs_mkdir() argument
658 return f2fs_create(sbi, de); in f2fs_mkdir()
661 int f2fs_symlink(struct f2fs_sb_info *sbi, struct dentry *de) in f2fs_symlink() argument
663 return f2fs_create(sbi, de); in f2fs_symlink()
666 int f2fs_find_path(struct f2fs_sb_info *sbi, char *path, nid_t *ino) in f2fs_find_path() argument
678 *ino = F2FS_ROOT_INO(sbi); in f2fs_find_path()
687 get_node_info(sbi, *ino, &ni); in f2fs_find_path()
695 ret = f2fs_find_entry(sbi, parent, &de); in f2fs_find_path()