Lines Matching refs:dir
131 struct inode *dir = d_inode(parent); in __dcache_find_get_entry() local
137 if (ptr_pos >= i_size_read(dir)) in __dcache_find_get_entry()
142 cache_ctl->page = find_lock_page(&dir->i_data, ptr_pgoff); in __dcache_find_get_entry()
159 if (ceph_dir_is_complete_ordered(dir) && ptr_pos < i_size_read(dir)) in __dcache_find_get_entry()
186 struct inode *dir = d_inode(parent); in __dcache_readdir() local
193 dout("__dcache_readdir %p v%u at %llx\n", dir, (unsigned)shared_gen, ctx->pos); in __dcache_readdir()
197 u64 count = div_u64(i_size_read(dir), sizeof(struct dentry *)); in __dcache_readdir()
223 dout("__dcache_readdir %p cache idx %llu\n", dir, idx); in __dcache_readdir()
745 static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, in ceph_lookup() argument
748 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_lookup()
749 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_lookup()
756 dir, dentry, dentry); in ceph_lookup()
763 struct ceph_inode_info *ci = ceph_inode(dir); in ceph_lookup()
767 dout(" dir %p flags are 0x%lx\n", dir, ci->i_ceph_flags); in ceph_lookup()
771 !is_root_ceph_dentry(dir, dentry) && in ceph_lookup()
777 dout(" dir %p complete, -ENOENT\n", dir); in ceph_lookup()
785 op = ceph_snap(dir) == CEPH_SNAPDIR ? in ceph_lookup()
794 if (ceph_security_xattr_wanted(dir)) in ceph_lookup()
798 req->r_parent = dir; in ceph_lookup()
812 int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry) in ceph_handle_notrace_create() argument
814 struct dentry *result = ceph_lookup(dir, dentry, 0); in ceph_handle_notrace_create()
835 static int ceph_mknod(struct inode *dir, struct dentry *dentry, in ceph_mknod() argument
838 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mknod()
843 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_mknod()
846 if (ceph_quota_is_max_files_exceeded(dir)) { in ceph_mknod()
851 err = ceph_pre_init_acls(dir, &mode, &as_ctx); in ceph_mknod()
859 dir, dentry, mode, rdev); in ceph_mknod()
867 req->r_parent = dir; in ceph_mknod()
877 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mknod()
879 err = ceph_handle_notrace_create(dir, dentry); in ceph_mknod()
890 static int ceph_create(struct inode *dir, struct dentry *dentry, umode_t mode, in ceph_create() argument
893 return ceph_mknod(dir, dentry, mode, 0); in ceph_create()
896 static int ceph_symlink(struct inode *dir, struct dentry *dentry, in ceph_symlink() argument
899 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_symlink()
904 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_symlink()
907 if (ceph_quota_is_max_files_exceeded(dir)) { in ceph_symlink()
916 dout("symlink in dir %p dentry %p to '%s'\n", dir, dentry, dest); in ceph_symlink()
928 req->r_parent = dir; in ceph_symlink()
938 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_symlink()
940 err = ceph_handle_notrace_create(dir, dentry); in ceph_symlink()
949 static int ceph_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) in ceph_mkdir() argument
951 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_mkdir()
957 if (ceph_snap(dir) == CEPH_SNAPDIR) { in ceph_mkdir()
960 dout("mksnap dir %p snap '%pd' dn %p\n", dir, in ceph_mkdir()
962 } else if (ceph_snap(dir) == CEPH_NOSNAP) { in ceph_mkdir()
963 dout("mkdir dir %p dn %p mode 0%ho\n", dir, dentry, mode); in ceph_mkdir()
970 ceph_quota_is_max_files_exceeded(dir)) { in ceph_mkdir()
976 err = ceph_pre_init_acls(dir, &mode, &as_ctx); in ceph_mkdir()
991 req->r_parent = dir; in ceph_mkdir()
1000 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_mkdir()
1004 err = ceph_handle_notrace_create(dir, dentry); in ceph_mkdir()
1015 static int ceph_link(struct dentry *old_dentry, struct inode *dir, in ceph_link() argument
1018 struct ceph_mds_client *mdsc = ceph_sb_to_mdsc(dir->i_sb); in ceph_link()
1022 if (ceph_snap(dir) != CEPH_NOSNAP) in ceph_link()
1025 dout("link in dir %p old_dentry %p dentry %p\n", dir, in ceph_link()
1035 req->r_parent = dir; in ceph_link()
1041 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_link()
1088 static int get_caps_for_async_unlink(struct inode *dir, struct dentry *dentry) in get_caps_for_async_unlink() argument
1090 struct ceph_inode_info *ci = ceph_inode(dir); in get_caps_for_async_unlink()
1127 static int ceph_unlink(struct inode *dir, struct dentry *dentry) in ceph_unlink() argument
1129 struct ceph_fs_client *fsc = ceph_sb_to_client(dir->i_sb); in ceph_unlink()
1137 if (ceph_snap(dir) == CEPH_SNAPDIR) { in ceph_unlink()
1139 dout("rmsnap dir %p '%pd' dn %p\n", dir, dentry, dentry); in ceph_unlink()
1141 } else if (ceph_snap(dir) == CEPH_NOSNAP) { in ceph_unlink()
1143 dir, dentry, inode); in ceph_unlink()
1156 req->r_parent = dir; in ceph_unlink()
1162 (req->r_dir_caps = get_caps_for_async_unlink(dir, dentry))) { in ceph_unlink()
1163 dout("async unlink on %llu/%.*s caps=%s", ceph_ino(dir), in ceph_unlink()
1170 err = ceph_mdsc_submit_request(mdsc, dir, req); in ceph_unlink()
1185 err = ceph_mdsc_do_request(mdsc, dir, req); in ceph_unlink()
1608 struct inode *dir; in __dir_lease_try_check() local
1617 dir = d_inode(dentry->d_parent); in __dir_lease_try_check()
1618 ci = ceph_inode(dir); in __dir_lease_try_check()
1637 static int dir_lease_is_valid(struct inode *dir, struct dentry *dentry, in dir_lease_is_valid() argument
1640 struct ceph_inode_info *ci = ceph_inode(dir); in dir_lease_is_valid()
1655 if (dir == d_inode(dentry->d_parent) && in dir_lease_is_valid()
1663 dir, (unsigned)atomic_read(&ci->i_shared_gen), dentry, valid); in dir_lease_is_valid()
1674 struct inode *dir, *inode; in ceph_d_revalidate() local
1679 dir = d_inode_rcu(parent); in ceph_d_revalidate()
1680 if (!dir) in ceph_d_revalidate()
1685 dir = d_inode(parent); in ceph_d_revalidate()
1692 mdsc = ceph_sb_to_client(dir->i_sb)->mdsc; in ceph_d_revalidate()
1695 if (ceph_snap(dir) != CEPH_NOSNAP) { in ceph_d_revalidate()
1705 if (valid || dir_lease_is_valid(dir, dentry, mdsc)) { in ceph_d_revalidate()
1723 op = ceph_snap(dir) == CEPH_SNAPDIR ? in ceph_d_revalidate()
1729 req->r_parent = dir; in ceph_d_revalidate()
1732 if (ceph_security_xattr_wanted(dir)) in ceph_d_revalidate()
1760 ceph_dir_clear_complete(dir); in ceph_d_revalidate()
1911 unsigned ceph_dentry_hash(struct inode *dir, struct dentry *dn) in ceph_dentry_hash() argument
1913 struct ceph_inode_info *dci = ceph_inode(dir); in ceph_dentry_hash()