Lines Matching refs:dir

146 	struct inode *dir = d_inode(parent);  in __dcache_readdir()  local
154 dout("__dcache_readdir %p v%u at %llu\n", dir, shared_gen, ctx->pos); in __dcache_readdir()
167 if (ptr_pos >= i_size_read(dir)) { in __dcache_readdir()
177 cache_ctl.page = find_lock_page(&dir->i_data, pgoff); in __dcache_readdir()
192 if (ceph_dir_is_complete_ordered(dir) && in __dcache_readdir()
193 ptr_pos < i_size_read(dir)) in __dcache_readdir()
620 static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, in ceph_lookup() argument
623 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_lookup()
630 dir, dentry, dentry); in ceph_lookup()
641 struct ceph_inode_info *ci = ceph_inode(dir); in ceph_lookup()
645 dout(" dir %p flags are %d\n", dir, ci->i_ceph_flags); in ceph_lookup()
649 !is_root_ceph_dentry(dir, dentry) && in ceph_lookup()
654 dout(" dir %p complete, -ENOENT\n", dir); in ceph_lookup()
662 op = ceph_snap(dir) == CEPH_SNAPDIR ? in ceph_lookup()
671 req->r_locked_dir = dir; in ceph_lookup()
684 int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry) in ceph_handle_notrace_create() argument
686 struct dentry *result = ceph_lookup(dir, dentry, 0); in ceph_handle_notrace_create()
707 static int ceph_mknod(struct inode *dir, struct dentry *dentry, in ceph_mknod() argument
710 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_mknod()
716 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_mknod()
719 err = ceph_pre_init_acls(dir, &mode, &acls); in ceph_mknod()
724 dir, dentry, mode, rdev); in ceph_mknod()
732 req->r_locked_dir = dir; in ceph_mknod()
741 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
743 err = ceph_handle_notrace_create(dir, dentry); in ceph_mknod()
754 static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, in ceph_create() argument
757 return ceph_mknod(dir, dentry, mode, 0); in ceph_create()
760 static int ceph_symlink(struct inode *dir, struct dentry *dentry, in ceph_symlink() argument
763 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_symlink()
768 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_symlink()
771 dout("symlink in dir %p dentry %p to '%s'\n", dir, dentry, dest); in ceph_symlink()
783 req->r_locked_dir = dir; in ceph_symlink()
788 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
790 err = ceph_handle_notrace_create(dir, dentry); in ceph_symlink()
798 static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in ceph_mkdir() argument
800 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_mkdir()
807 if (ceph_snap(dir) == CEPH_SNAPDIR) { in ceph_mkdir()
810 dout("mksnap dir %p snap '%pd' dn %p\n", dir, in ceph_mkdir()
812 } else if (ceph_snap(dir) == CEPH_NOSNAP) { in ceph_mkdir()
813 dout("mkdir dir %p dn %p mode 0%ho\n", dir, dentry, mode); in ceph_mkdir()
820 err = ceph_pre_init_acls(dir, &mode, &acls); in ceph_mkdir()
832 req->r_locked_dir = dir; in ceph_mkdir()
840 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
844 err = ceph_handle_notrace_create(dir, dentry); in ceph_mkdir()
855 static int ceph_link(struct dentry *old_dentry, struct inode *dir, in ceph_link() argument
858 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_link()
863 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_link()
866 dout("link in dir %p old_dentry %p dentry %p\n", dir, in ceph_link()
876 req->r_locked_dir = dir; in ceph_link()
881 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
915 static int ceph_unlink(struct inode *dir, struct dentry *dentry) in ceph_unlink() argument
917 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_unlink()
924 if (ceph_snap(dir) == CEPH_SNAPDIR) { in ceph_unlink()
926 dout("rmsnap dir %p '%pd' dn %p\n", dir, dentry, dentry); in ceph_unlink()
928 } else if (ceph_snap(dir) == CEPH_NOSNAP) { in ceph_unlink()
930 dir, dentry, inode); in ceph_unlink()
942 req->r_locked_dir = dir; in ceph_unlink()
946 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1035 struct inode *dir = NULL; in dentry_lease_is_valid() local
1054 dir = d_inode(dentry->d_parent); in dentry_lease_is_valid()
1065 ceph_mdsc_lease_send_msg(session, dir, dentry, in dentry_lease_is_valid()
1076 static int dir_lease_is_valid(struct inode *dir, struct dentry *dentry) in dir_lease_is_valid() argument
1078 struct ceph_inode_info *ci = ceph_inode(dir); in dir_lease_is_valid()
1087 dir, (unsigned)ci->i_shared_gen, dentry, in dir_lease_is_valid()
1098 struct inode *dir; in ceph_d_revalidate() local
1106 dir = ceph_get_dentry_parent_inode(dentry); in ceph_d_revalidate()
1109 if (ceph_snap(dir) != CEPH_NOSNAP) { in ceph_d_revalidate()
1117 dir_lease_is_valid(dir, dentry)) { in ceph_d_revalidate()
1128 ceph_dir_clear_complete(dir); in ceph_d_revalidate()
1130 iput(dir); in ceph_d_revalidate()
1283 unsigned ceph_dentry_hash(struct inode *dir, struct dentry *dn) in ceph_dentry_hash() argument
1285 struct ceph_inode_info *dci = ceph_inode(dir); in ceph_dentry_hash()