Lines Matching refs:inode

54 static int ll_create_it(struct inode *, struct dentry *,
79 static int ll_test_inode(struct inode *inode, void *opaque)
81 struct ll_inode_info *lli = ll_i2info(inode);
95 static int ll_set_inode(struct inode *inode, void *opaque)
97 struct ll_inode_info *lli = ll_i2info(inode);
107 CERROR("Can not initialize inode "DFID" without object type: "
112 inode->i_mode = (inode->i_mode & ~S_IFMT) | (body->mode & S_IFMT);
113 if (unlikely(inode->i_mode == 0)) {
114 CERROR("Invalid inode "DFID" type\n", PFID(&lli->lli_fid));
125 * Get an inode by inode number (already instantiated by the intent lookup).
126 * Returns inode or NULL
128 struct inode *ll_iget(struct super_block *sb, ino_t hash,
131 struct inode *inode;
134 inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, md);
136 if (inode) {
137 if (inode->i_state & I_NEW) {
140 ll_read_inode2(inode, md);
141 if (S_ISREG(inode->i_mode) &&
142 ll_i2info(inode)->lli_clob == NULL) {
144 "%s: apply lsm %p to inode "DFID".\n",
146 PFID(ll_inode2fid(inode)));
147 rc = cl_file_inode_init(inode, md);
150 make_bad_inode(inode);
151 unlock_new_inode(inode);
152 iput(inode);
153 inode = ERR_PTR(rc);
155 unlock_new_inode(inode);
156 } else if (!(inode->i_state & (I_FREEING | I_CLEAR)))
157 ll_update_inode(inode, md);
158 CDEBUG(D_VFSTRACE, "got inode: %p for "DFID"\n",
159 inode, PFID(&md->body->fid1));
161 return inode;
164 static void ll_invalidate_negative_children(struct inode *dir)
203 struct inode *inode = ll_inode_from_resource_lock(lock);
210 if (inode == NULL)
213 /* Invalidate all dentries associated with this inode */
216 if (!fid_res_name_eq(ll_inode2fid(inode),
219 PFID(ll_inode2fid(inode)), inode);
224 ll_xattr_cache_destroy(inode);
231 ll_have_md_lock(inode, &bits, lock->l_req_mode);
251 ll_md_real_close(inode, fmode);
256 ll_have_md_lock(inode, &bits, LCK_MINMODE);
261 .coc_inode = inode,
264 rc = ll_layout_conf(inode, &conf);
268 PFID(ll_inode2fid(inode)), rc);
272 struct ll_inode_info *lli = ll_i2info(inode);
279 if ((bits & MDS_INODELOCK_UPDATE) && S_ISDIR(inode->i_mode)) {
280 CDEBUG(D_INODE, "invalidating inode %lu\n",
281 inode->i_ino);
282 truncate_inode_pages(inode->i_mapping, 0);
283 ll_invalidate_negative_children(inode);
287 inode->i_sb->s_root != NULL &&
288 inode != inode->i_sb->s_root->d_inode)
289 ll_invalidate_aliases(inode);
291 iput(inode);
301 __u32 ll_i2suppgid(struct inode *i)
310 * If we don't need to use the groups from the target inode(s) then we
313 void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2)
354 static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry)
359 if (ll_d_hlist_empty(&inode->i_dentry))
364 ll_lock_dcache(inode);
365 ll_d_hlist_for_each_entry(alias, p, &inode->i_dentry, d_alias) {
389 ll_unlock_dcache(inode);
398 struct dentry *ll_splice_alias(struct inode *inode, struct dentry *de)
403 if (inode) {
404 new = ll_find_alias(inode, de);
412 iput(inode);
414 "Reuse dentry %p inode %p refc %d flags %#x\n",
422 d_add(de, inode);
423 CDEBUG(D_DENTRY, "Add dentry %p inode %p refc %d flags %#x\n",
430 struct inode *parent, struct dentry **de)
432 struct inode *inode = NULL;
441 rc = ll_prep_inode(&inode, request, (*de)->d_sb, it);
445 ll_set_lock_data(ll_i2sbi(parent)->ll_md_exp, inode, it, &bits);
463 alias = ll_splice_alias(inode, *de);
472 d_instantiate(*de, inode);
499 static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
583 static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,
613 static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
693 static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it)
695 struct inode *inode = NULL;
705 rc = ll_prep_inode(&inode, request, dir->i_sb, it);
707 inode = ERR_PTR(rc);
711 LASSERT(ll_d_hlist_empty(&inode->i_dentry));
714 * lock on the inode. Since we finally have an inode pointer,
716 CDEBUG(D_DLMTRACE, "setting l_ast_data to inode %p (%lu/%u)\n",
717 inode, inode->i_ino, inode->i_generation);
718 ll_set_lock_data(sbi->ll_md_exp, inode, it, NULL);
721 return inode;
726 * entry for the new file, but it is so far negative - it has no inode.
730 * inode number before calling ll_create_node() (which is needed for LOV),
735 * If the create succeeds, we fill in the inode information
738 static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
741 struct inode *inode;
752 inode = ll_create_node(dir, it);
753 if (IS_ERR(inode))
754 return PTR_ERR(inode);
756 d_instantiate(dentry, inode);
761 struct inode *inode)
768 body->mtime > LTIME_S(inode->i_mtime)) {
770 inode->i_ino, LTIME_S(inode->i_mtime), body->mtime);
771 LTIME_S(inode->i_mtime) = body->mtime;
774 body->ctime > LTIME_S(inode->i_ctime))
775 LTIME_S(inode->i_ctime) = body->ctime;
778 static int ll_new_node(struct inode *dir, struct qstr *name,
784 struct inode *inode = NULL;
810 err = ll_prep_inode(&inode, request, dchild->d_sb, NULL);
814 d_instantiate(dchild, inode);
822 static int ll_mknod_generic(struct inode *dir, struct qstr *name, int mode,
861 static int ll_create_nd(struct inode *dir, struct dentry *dentry,
881 static int ll_symlink_generic(struct inode *dir, struct qstr *name,
899 static int ll_link_generic(struct inode *src, struct inode *dir,
908 "VFS Op: inode=%lu/%u(%p), dir=%lu/%u(%p), target=%.*s\n",
929 static int ll_mkdir_generic(struct inode *dir, struct qstr *name,
951 static void ll_get_child_fid(struct inode * dir, struct qstr *name,
965 static int ll_rmdir_generic(struct inode *dir, struct dentry *dparent,
999 int ll_rmdir_entry(struct inode *dir, char *name, int namelen)
1024 int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
1102 /* ll_unlink_generic() doesn't update the inode with the new link count.
1106 static int ll_unlink_generic(struct inode *dir, struct dentry *dparent,
1143 static int ll_rename_generic(struct inode *src, struct dentry *src_dparent,
1145 struct inode *tgt, struct dentry *tgt_dparent,
1186 static int ll_mknod(struct inode *dir, struct dentry *dchild, ll_umode_t mode,
1193 static int ll_unlink(struct inode * dir, struct dentry *dentry)
1198 static int ll_mkdir(struct inode *dir, struct dentry *dentry, ll_umode_t mode)
1203 static int ll_rmdir(struct inode *dir, struct dentry *dentry)
1208 static int ll_symlink(struct inode *dir, struct dentry *dentry,
1214 static int ll_link(struct dentry *old_dentry, struct inode *dir,
1221 static int ll_rename(struct inode *old_dir, struct dentry *old_dentry,
1222 struct inode *new_dir, struct dentry *new_dentry)