Lines Matching refs:dir

125 	struct inode *dir = d_inode(parent);  in __dcache_readdir()  local
136 dir, shared_gen, ctx->pos, last); in __dcache_readdir()
184 if (!ceph_dir_is_complete_ordered(dir)) { in __dcache_readdir()
185 dout(" lost dir complete on %p; falling back to mds\n", dir); in __dcache_readdir()
610 static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, in ceph_lookup() argument
613 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_lookup()
620 dir, dentry, dentry); in ceph_lookup()
631 struct ceph_inode_info *ci = ceph_inode(dir); in ceph_lookup()
635 dout(" dir %p flags are %d\n", dir, ci->i_ceph_flags); in ceph_lookup()
639 !is_root_ceph_dentry(dir, dentry) && in ceph_lookup()
644 dout(" dir %p complete, -ENOENT\n", dir); in ceph_lookup()
652 op = ceph_snap(dir) == CEPH_SNAPDIR ? in ceph_lookup()
661 req->r_locked_dir = dir; in ceph_lookup()
674 int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry) in ceph_handle_notrace_create() argument
676 struct dentry *result = ceph_lookup(dir, dentry, 0); in ceph_handle_notrace_create()
697 static int ceph_mknod(struct inode *dir, struct dentry *dentry, in ceph_mknod() argument
700 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_mknod()
706 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_mknod()
709 err = ceph_pre_init_acls(dir, &mode, &acls); in ceph_mknod()
714 dir, dentry, mode, rdev); in ceph_mknod()
722 req->r_locked_dir = dir; in ceph_mknod()
731 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
733 err = ceph_handle_notrace_create(dir, dentry); in ceph_mknod()
744 static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, in ceph_create() argument
747 return ceph_mknod(dir, dentry, mode, 0); in ceph_create()
750 static int ceph_symlink(struct inode *dir, struct dentry *dentry, in ceph_symlink() argument
753 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_symlink()
758 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_symlink()
761 dout("symlink in dir %p dentry %p to '%s'\n", dir, dentry, dest); in ceph_symlink()
773 req->r_locked_dir = dir; in ceph_symlink()
778 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
780 err = ceph_handle_notrace_create(dir, dentry); in ceph_symlink()
788 static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in ceph_mkdir() argument
790 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_mkdir()
797 if (ceph_snap(dir) == CEPH_SNAPDIR) { in ceph_mkdir()
800 dout("mksnap dir %p snap '%pd' dn %p\n", dir, in ceph_mkdir()
802 } else if (ceph_snap(dir) == CEPH_NOSNAP) { in ceph_mkdir()
803 dout("mkdir dir %p dn %p mode 0%ho\n", dir, dentry, mode); in ceph_mkdir()
810 err = ceph_pre_init_acls(dir, &mode, &acls); in ceph_mkdir()
822 req->r_locked_dir = dir; in ceph_mkdir()
830 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
834 err = ceph_handle_notrace_create(dir, dentry); in ceph_mkdir()
845 static int ceph_link(struct dentry *old_dentry, struct inode *dir, in ceph_link() argument
848 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_link()
853 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_link()
856 dout("link in dir %p old_dentry %p dentry %p\n", dir, in ceph_link()
866 req->r_locked_dir = dir; in ceph_link()
871 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
905 static int ceph_unlink(struct inode *dir, struct dentry *dentry) in ceph_unlink() argument
907 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_unlink()
914 if (ceph_snap(dir) == CEPH_SNAPDIR) { in ceph_unlink()
916 dout("rmsnap dir %p '%pd' dn %p\n", dir, dentry, dentry); in ceph_unlink()
918 } else if (ceph_snap(dir) == CEPH_NOSNAP) { in ceph_unlink()
920 dir, dentry, inode); in ceph_unlink()
932 req->r_locked_dir = dir; in ceph_unlink()
936 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1026 struct inode *dir = NULL; in dentry_lease_is_valid() local
1045 dir = d_inode(dentry->d_parent); in dentry_lease_is_valid()
1056 ceph_mdsc_lease_send_msg(session, dir, dentry, in dentry_lease_is_valid()
1067 static int dir_lease_is_valid(struct inode *dir, struct dentry *dentry) in dir_lease_is_valid() argument
1069 struct ceph_inode_info *ci = ceph_inode(dir); in dir_lease_is_valid()
1078 dir, (unsigned)ci->i_shared_gen, dentry, in dir_lease_is_valid()
1089 struct inode *dir; in ceph_d_revalidate() local
1097 dir = ceph_get_dentry_parent_inode(dentry); in ceph_d_revalidate()
1100 if (ceph_snap(dir) != CEPH_NOSNAP) { in ceph_d_revalidate()
1108 dir_lease_is_valid(dir, dentry)) { in ceph_d_revalidate()
1119 ceph_dir_clear_complete(dir); in ceph_d_revalidate()
1121 iput(dir); in ceph_d_revalidate()
1334 unsigned ceph_dentry_hash(struct inode *dir, struct dentry *dn) in ceph_dentry_hash() argument
1336 struct ceph_inode_info *dci = ceph_inode(dir); in ceph_dentry_hash()