Lines Matching full:dir

241 	       clu.dir != EXFAT_EOF_CLUSTER) {  in exfat_search_empty_slot()
256 clu.dir++; in exfat_search_empty_slot()
258 clu.dir = EXFAT_EOF_CLUSTER; in exfat_search_empty_slot()
260 if (exfat_get_next_cluster(sb, &clu.dir)) in exfat_search_empty_slot()
270 if (dentry == total_entries || clu.dir == EXFAT_EOF_CLUSTER) in exfat_search_empty_slot()
283 * exFAT spec allows a dir to grow up to 8388608(256MB) in exfat_check_max_dentries()
342 if (exfat_zeroed_cluster(inode, clu.dir)) in exfat_find_empty_entry()
346 ei->start_clu = clu.dir; in exfat_find_empty_entry()
347 p_dir->dir = clu.dir; in exfat_find_empty_entry()
355 exfat_chain_cont_cluster(sb, p_dir->dir, p_dir->size); in exfat_find_empty_entry()
361 if (exfat_ent_set(sb, last_clu, clu.dir)) in exfat_find_empty_entry()
364 if (hint_femp.cur.dir == EXFAT_EOF_CLUSTER) in exfat_find_empty_entry()
365 exfat_chain_set(&hint_femp.cur, clu.dir, 0, clu.flags); in exfat_find_empty_entry()
441 const unsigned char *path, struct exfat_chain *dir, in exfat_resolve_path() argument
444 return __exfat_resolve_path(inode, path, dir, uni, 0); in exfat_resolve_path()
448 const unsigned char *path, struct exfat_chain *dir, in exfat_resolve_path_for_lookup() argument
451 return __exfat_resolve_path(inode, path, dir, uni, 1); in exfat_resolve_path_for_lookup()
456 return ((loff_t) info->dir.dir << 32) | (info->entry & 0xffffffff); in exfat_make_i_pos()
496 start_clu = clu.dir; in exfat_add_entry()
511 info->dir = *p_dir; in exfat_add_entry()
539 static int exfat_create(struct mnt_idmap *idmap, struct inode *dir, in exfat_create() argument
542 struct super_block *sb = dir->i_sb; in exfat_create()
548 loff_t size = i_size_read(dir); in exfat_create()
555 err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_FILE, in exfat_create()
560 inode_inc_iversion(dir); in exfat_create()
561 inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); in exfat_create()
562 if (IS_DIRSYNC(dir) && size != i_size_read(dir)) in exfat_create()
563 exfat_sync_inode(dir); in exfat_create()
565 mark_inode_dirty(dir); in exfat_create()
586 static int exfat_find(struct inode *dir, struct qstr *qname, in exfat_find() argument
592 struct super_block *sb = dir->i_sb; in exfat_find()
594 struct exfat_inode_info *ei = EXFAT_I(dir); in exfat_find()
597 /* for optimized dir & entry to prevent long traverse of cluster chain */ in exfat_find()
604 ret = exfat_resolve_path_for_lookup(dir, qname->name, &cdir, &uni_name); in exfat_find()
609 if (ei->version != (inode_peek_iversion_raw(dir) & 0xffffffff)) { in exfat_find()
610 ei->hint_stat.clu = cdir.dir; in exfat_find()
612 ei->version = (inode_peek_iversion_raw(dir) & 0xffffffff); in exfat_find()
621 info->dir = cdir; in exfat_find()
626 cdir.dir = hint_opt.clu; in exfat_find()
669 i_size_read(dir), ei->dir.dir, ei->entry); in exfat_find()
690 static struct dentry *exfat_lookup(struct inode *dir, struct dentry *dentry, in exfat_lookup() argument
693 struct super_block *sb = dir->i_sb; in exfat_lookup()
702 err = exfat_find(dir, &dentry->d_name, &info); in exfat_lookup()
722 * FS is not corrupted (especially double linked dir). in exfat_lookup()
758 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_lookup()
767 static int exfat_unlink(struct inode *dir, struct dentry *dentry) in exfat_unlink() argument
770 struct super_block *sb = dir->i_sb; in exfat_unlink()
780 exfat_chain_dup(&cdir, &ei->dir); in exfat_unlink()
782 if (ei->dir.dir == DIR_DELETED) { in exfat_unlink()
804 ei->dir.dir = DIR_DELETED; in exfat_unlink()
806 inode_inc_iversion(dir); in exfat_unlink()
807 simple_inode_init_ts(dir); in exfat_unlink()
808 exfat_truncate_inode_atime(dir); in exfat_unlink()
809 mark_inode_dirty(dir); in exfat_unlink()
815 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_unlink()
821 static int exfat_mkdir(struct mnt_idmap *idmap, struct inode *dir, in exfat_mkdir() argument
824 struct super_block *sb = dir->i_sb; in exfat_mkdir()
830 loff_t size = i_size_read(dir); in exfat_mkdir()
837 err = exfat_add_entry(dir, dentry->d_name.name, &cdir, TYPE_DIR, in exfat_mkdir()
842 inode_inc_iversion(dir); in exfat_mkdir()
843 inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir)); in exfat_mkdir()
844 if (IS_DIRSYNC(dir) && size != i_size_read(dir)) in exfat_mkdir()
845 exfat_sync_inode(dir); in exfat_mkdir()
847 mark_inode_dirty(dir); in exfat_mkdir()
848 inc_nlink(dir); in exfat_mkdir()
880 if (p_dir->dir == EXFAT_EOF_CLUSTER) in exfat_check_dir_empty()
885 while (clu.dir != EXFAT_EOF_CLUSTER) { in exfat_check_dir_empty()
903 clu.dir++; in exfat_check_dir_empty()
905 clu.dir = EXFAT_EOF_CLUSTER; in exfat_check_dir_empty()
907 if (exfat_get_next_cluster(sb, &(clu.dir))) in exfat_check_dir_empty()
915 static int exfat_rmdir(struct inode *dir, struct dentry *dentry) in exfat_rmdir() argument
930 exfat_chain_dup(&cdir, &ei->dir); in exfat_rmdir()
933 if (ei->dir.dir == DIR_DELETED) { in exfat_rmdir()
960 err = exfat_put_dentry_set(&es, IS_DIRSYNC(dir)); in exfat_rmdir()
964 ei->dir.dir = DIR_DELETED; in exfat_rmdir()
966 inode_inc_iversion(dir); in exfat_rmdir()
967 simple_inode_init_ts(dir); in exfat_rmdir()
968 exfat_truncate_inode_atime(dir); in exfat_rmdir()
969 if (IS_DIRSYNC(dir)) in exfat_rmdir()
970 exfat_sync_inode(dir); in exfat_rmdir()
972 mark_inode_dirty(dir); in exfat_rmdir()
973 drop_nlink(dir); in exfat_rmdir()
979 exfat_d_version_set(dentry, inode_query_iversion(dir)); in exfat_rmdir()
1038 ei->dir = *p_dir; in exfat_rename_file()
1096 exfat_chain_set(&ei->dir, p_newdir->dir, p_newdir->size, in exfat_move_file()
1137 if (ei->dir.dir == DIR_DELETED) { in __exfat_rename()
1147 /* check whether new dir is existing directory and empty */ in __exfat_rename()
1152 if (new_ei->dir.dir == DIR_DELETED) { in __exfat_rename()
1157 p_dir = &(new_ei->dir); in __exfat_rename()
1170 new_clu.dir = new_ei->start_clu; in __exfat_rename()
1190 if (olddir.dir == newdir.dir) in __exfat_rename()
1214 /* Free the clusters if new_inode is a dir(as if exfat_rmdir) */ in __exfat_rename()
1239 new_ei->dir.dir = DIR_DELETED; in __exfat_rename()
1281 i_pos = ((loff_t)EXFAT_I(old_inode)->dir.dir << 32) | in exfat_rename()