Lines Matching defs:node

86 	/* Check accessibility of requested node as a first step. */
91 /* We cannot be requesting the parent directory of the root node. */
276 struct tmpfs_node *node;
280 node = VP_TO_TMPFS_NODE(vp);
285 if (node->tn_links < 1)
289 if (node->tn_flags & APPEND && (mode & (FWRITE | O_APPEND)) == FWRITE)
294 KASSERT(vp->v_type != VREG || (node->tn_reg.tn_aobj->flags &
296 vnode_create_vobject(vp, node->tn_size, v->a_td);
308 /* Update node times. */
322 struct tmpfs_node *node;
326 node = VP_TO_TMPFS_NODE(vp);
354 if (accmode & VWRITE && node->tn_flags & IMMUTABLE) {
359 error = vaccess(vp->v_type, node->tn_mode, node->tn_uid,
360 node->tn_gid, accmode, cred, NULL);
374 struct tmpfs_node *node;
376 node = VP_TO_TMPFS_NODE(vp);
381 vap->va_mode = node->tn_mode;
382 vap->va_nlink = node->tn_links;
383 vap->va_uid = node->tn_uid;
384 vap->va_gid = node->tn_gid;
386 vap->va_fileid = node->tn_id;
387 vap->va_size = node->tn_size;
389 vap->va_atime = node->tn_atime;
390 vap->va_mtime = node->tn_mtime;
391 vap->va_ctime = node->tn_ctime;
392 vap->va_birthtime = node->tn_birthtime;
393 vap->va_gen = node->tn_gen;
394 vap->va_flags = node->tn_flags;
396 node->tn_rdev : NODEV;
398 obj = node->tn_reg.tn_aobj;
401 vap->va_bytes = node->tn_size;
452 /* Update the node times. We give preference to the error codes
467 struct tmpfs_node *node;
475 node = VP_TO_TMPFS_NODE(vp);
476 tmpfs_set_status(VFS_TO_TMPFS(vp->v_mount), node, TMPFS_NODE_ACCESSED);
477 return (uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio));
485 struct tmpfs_node *node;
493 node = VP_TO_TMPFS_NODE(vp);
494 oldsize = node->tn_size;
501 uio->uio_offset = node->tn_size;
507 if (uio->uio_offset + uio->uio_resid > node->tn_size) {
514 error = uiomove_object(node->tn_reg.tn_aobj, node->tn_size, uio);
515 node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_MODIFIED |
517 if (node->tn_mode & (S_ISUID | S_ISGID)) {
519 node->tn_mode &= ~(S_ISUID | S_ISGID);
526 MPASS(IMPLIES(error != 0, oldsize == node->tn_size));
554 struct tmpfs_node *node;
565 node = VP_TO_TMPFS_NODE(vp);
567 de = tmpfs_dir_lookup(dnode, node, v->a_cnp);
571 if ((node->tn_flags & (IMMUTABLE | APPEND | NOUNLINK)) ||
583 /* Free the directory entry we just deleted. Note that the node
588 node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED;
605 struct tmpfs_node *node;
610 node = VP_TO_TMPFS_NODE(vp);
614 MPASS(node->tn_links <= LINK_MAX);
615 if (node->tn_links == LINK_MAX) {
621 if (node->tn_flags & (IMMUTABLE | APPEND)) {
626 /* Allocate a new directory entry to represent the node. */
627 error = tmpfs_alloc_dirent(VFS_TO_TMPFS(vp->v_mount), node,
637 /* vp link count has changed, so update node times. */
638 node->tn_status |= TMPFS_NODE_CHANGED;
914 * If the node is being moved to another directory, we have to do
1034 * node referred by it will not be removed until the vnode is
1098 struct tmpfs_node *node;
1105 node = VP_TO_TMPFS_DIR(vp);
1109 if (node->tn_size > 0) {
1115 || (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND))) {
1122 MPASS(node->tn_dir.tn_parent == dnode);
1124 /* Get the directory entry associated with node (vp). This was
1126 de = tmpfs_dir_lookup(dnode, node, v->a_cnp);
1133 (node->tn_flags & (NOUNLINK | IMMUTABLE | APPEND)) != 0) {
1145 TMPFS_NODE_LOCK(node);
1146 node->tn_links--;
1147 node->tn_dir.tn_parent = NULL;
1148 node->tn_status |= TMPFS_NODE_ACCESSED | TMPFS_NODE_CHANGED |
1151 TMPFS_NODE_UNLOCK(node);
1164 /* Free the directory entry we just deleted. Note that the node
1169 /* Release the deleted vnode (will destroy the node, notify
1205 struct tmpfs_node *node;
1222 node = VP_TO_TMPFS_DIR(vp);
1229 maxcookies = howmany(node->tn_size,
1237 error = tmpfs_dir_getdents(tm, node, uio, 0, NULL, NULL);
1239 error = tmpfs_dir_getdents(tm, node, uio, maxcookies, *cookies,
1266 struct tmpfs_node *node;
1271 node = VP_TO_TMPFS_NODE(vp);
1273 error = uiomove(node->tn_link, MIN(node->tn_size, uio->uio_resid),
1275 tmpfs_set_status(VFS_TO_TMPFS(vp->v_mount), node, TMPFS_NODE_ACCESSED);
1284 struct tmpfs_node *node;
1287 node = VP_TO_TMPFS_NODE(vp);
1288 if (node->tn_links == 0)
1301 struct tmpfs_node *node;
1303 node = VP_TO_TMPFS_NODE(vp);
1307 tmpfs_destroy_vobject(vp, node->tn_reg.tn_aobj);
1314 TMPFS_NODE_LOCK(node);
1317 /* If the node referenced by this vnode was deleted by the user,
1320 if (node->tn_links == 0 &&
1321 (node->tn_vpstate & TMPFS_VNODE_ALLOCATING) == 0) {
1322 node->tn_vpstate = TMPFS_VNODE_DOOMED;
1323 TMPFS_NODE_UNLOCK(node);
1324 tmpfs_free_node(tmp, node);
1326 TMPFS_NODE_UNLOCK(node);
1337 struct tmpfs_node *node;
1339 node = VP_TO_TMPFS_NODE(vp);
1342 node, node->tn_flags, (uintmax_t)node->tn_links);
1344 node->tn_mode, node->tn_uid, node->tn_gid,
1345 (intmax_t)node->tn_size, node->tn_status);
1409 struct tmpfs_node *node;
1412 node = VP_TO_TMPFS_NODE(ap->a_vp);
1415 tfhp->tf_id = node->tn_id;
1416 tfhp->tf_gen = node->tn_gen;
1533 * node lock, so the directory cannot be changed while
1536 * node.
1561 ("node %p refcount zero", tnp));