Lines Matching refs:sbi
100 static int find_in_level(struct f2fs_sb_info *sbi,struct f2fs_node *dir, in find_in_level() argument
132 get_dnode_of_data(sbi, &dn, bidx, LOOKUP_NODE); in find_in_level()
155 static int f2fs_find_entry(struct f2fs_sb_info *sbi, in f2fs_find_entry() argument
163 if (find_in_level(sbi, dir, level, de)) in f2fs_find_entry()
192 static int f2fs_add_link(struct f2fs_sb_info *sbi, struct f2fs_node *parent, in f2fs_add_link() argument
241 get_dnode_of_data(sbi, &dn, block, ALLOC_NODE); in f2fs_add_link()
244 new_data_block(sbi, dentry_blk, &dn, CURSEG_HOT_DATA); in f2fs_add_link()
303 static void make_empty_dir(struct f2fs_sb_info *sbi, struct f2fs_node *inode) in make_empty_dir() argument
313 get_node_info(sbi, ino, &ni); in make_empty_dir()
334 reserve_new_block(sbi, &blkaddr, &sum, CURSEG_HOT_DATA); in make_empty_dir()
343 static void page_symlink(struct f2fs_sb_info *sbi, struct f2fs_node *inode, in page_symlink() argument
353 get_node_info(sbi, ino, &ni); in page_symlink()
369 reserve_new_block(sbi, &blkaddr, &sum, CURSEG_WARM_DATA); in page_symlink()
378 static void init_inode_block(struct f2fs_sb_info *sbi, in init_inode_block() argument
381 struct f2fs_checkpoint *ckpt = F2FS_CKPT(sbi); in init_inode_block()
434 make_empty_dir(sbi, node_blk); in init_inode_block()
436 page_symlink(sbi, node_blk, de->link, size); in init_inode_block()
439 int convert_inline_dentry(struct f2fs_sb_info *sbi, struct f2fs_node *node, in convert_inline_dentry() argument
469 get_dnode_of_data(sbi, &dn, 0, ALLOC_NODE); in convert_inline_dentry()
471 new_data_block(sbi, dentry_blk, &dn, CURSEG_HOT_DATA); in convert_inline_dentry()
494 make_empty_dir(sbi, node); in convert_inline_dentry()
521 ret = f2fs_add_link(sbi, node, filename, namelen, in convert_inline_dentry()
535 int f2fs_create(struct f2fs_sb_info *sbi, struct dentry *de) in f2fs_create() argument
544 get_node_info(sbi, de->pino, &ni); in f2fs_create()
557 ret = convert_inline_dentry(sbi, parent, ni.blk_addr); in f2fs_create()
563 ret = f2fs_find_entry(sbi, parent, de); in f2fs_create()
575 f2fs_alloc_nid(sbi, &de->ino, 1); in f2fs_create()
577 init_inode_block(sbi, child, de); in f2fs_create()
579 ret = f2fs_add_link(sbi, parent, child->i.i_name, in f2fs_create()
592 reserve_new_block(sbi, &blkaddr, &sum, CURSEG_HOT_NODE); in f2fs_create()
595 update_nat_blkaddr(sbi, de->ino, de->ino, blkaddr); in f2fs_create()
600 update_free_segments(sbi); in f2fs_create()
611 int f2fs_mkdir(struct f2fs_sb_info *sbi, struct dentry *de) in f2fs_mkdir() argument
613 return f2fs_create(sbi, de); in f2fs_mkdir()
616 int f2fs_symlink(struct f2fs_sb_info *sbi, struct dentry *de) in f2fs_symlink() argument
618 return f2fs_create(sbi, de); in f2fs_symlink()
621 int f2fs_find_path(struct f2fs_sb_info *sbi, char *path, nid_t *ino) in f2fs_find_path() argument
633 *ino = F2FS_ROOT_INO(sbi); in f2fs_find_path()
642 get_node_info(sbi, *ino, &ni); in f2fs_find_path()
650 ret = f2fs_find_entry(sbi, parent, &de); in f2fs_find_path()