Lines Matching refs:tmp

275 tarfs_lookup_path(struct tarfs_mount *tmp, char *name, size_t namelen,  in tarfs_lookup_path()  argument
290 parent = tnp = tmp->root; in tarfs_lookup_path()
331 if (tnp == tmp->root) { in tarfs_lookup_path()
351 error = tarfs_alloc_node(tmp, cn.cn_nameptr, in tarfs_lookup_path()
352 cn.cn_namelen, VDIR, -1, 0, tmp->mtime, 0, 0, in tarfs_lookup_path()
400 tarfs_free_mount(struct tarfs_mount *tmp) in tarfs_free_mount() argument
405 MPASS(tmp != NULL); in tarfs_free_mount()
407 TARFS_DPF(ALLOC, "%s: Freeing mount structure %p\n", __func__, tmp); in tarfs_free_mount()
410 TAILQ_FOREACH_SAFE(tnp, &tmp->allnodes, entries, tnp_next) { in tarfs_free_mount()
414 (void)tarfs_io_fini(tmp); in tarfs_free_mount()
417 delete_unrhdr(tmp->ino_unr); in tarfs_free_mount()
418 mp = tmp->vfs; in tarfs_free_mount()
422 free(tmp, M_TARFSMNT); in tarfs_free_mount()
433 tarfs_alloc_one(struct tarfs_mount *tmp, size_t *blknump) in tarfs_alloc_one() argument
458 res = tarfs_io_read_buf(tmp, false, block, in tarfs_alloc_one()
478 tmp->nblocks = blknum; in tarfs_alloc_one()
523 uid = tmp->root->uid; in tarfs_alloc_one()
532 gid = tmp->root->gid; in tarfs_alloc_one()
575 res = tarfs_io_read_buf(tmp, false, exthdr, in tarfs_alloc_one()
697 error = tarfs_lookup_path(tmp, name, namelen, &namep, in tarfs_alloc_one()
717 error = tarfs_alloc_node(tmp, namep, sep - namep, VDIR, in tarfs_alloc_one()
722 error = tarfs_alloc_node(tmp, namep, sep - namep, VREG, in tarfs_alloc_one()
740 error = tarfs_lookup_path(tmp, link, linklen, NULL, in tarfs_alloc_one()
749 error = tarfs_alloc_node(tmp, namep, sep - namep, VREG, in tarfs_alloc_one()
767 error = tarfs_alloc_node(tmp, namep, sep - namep, VLNK, in tarfs_alloc_one()
789 error = tarfs_alloc_node(tmp, namep, sep - namep, VBLK, in tarfs_alloc_one()
811 error = tarfs_alloc_node(tmp, namep, sep - namep, VCHR, in tarfs_alloc_one()
826 tmp->nblocks = blknum; in tarfs_alloc_one()
862 struct tarfs_mount *tmp; in tarfs_alloc_mount() local
871 tmp = NULL; in tarfs_alloc_mount()
887 tmp = malloc(sizeof(*tmp), M_TARFSMNT, M_WAITOK | M_ZERO); in tarfs_alloc_mount()
889 mp->mnt_data = tmp; in tarfs_alloc_mount()
891 mtx_init(&tmp->allnode_lock, "tarfs allnode lock", NULL, in tarfs_alloc_mount()
893 TAILQ_INIT(&tmp->allnodes); in tarfs_alloc_mount()
894 tmp->ino_unr = new_unrhdr(TARFS_MININO, INT_MAX, &tmp->allnode_lock); in tarfs_alloc_mount()
895 tmp->vp = vp; in tarfs_alloc_mount()
896 tmp->vfs = mp; in tarfs_alloc_mount()
897 tmp->mtime = mtime; in tarfs_alloc_mount()
900 tmp->iosize = 1U << tarfs_ioshift; in tarfs_alloc_mount()
901 error = tarfs_io_init(tmp); in tarfs_alloc_mount()
905 error = tarfs_alloc_node(tmp, NULL, 0, VDIR, 0, 0, mtime, root_uid, in tarfs_alloc_mount()
909 tmp->root = root; in tarfs_alloc_mount()
913 if ((error = tarfs_alloc_one(tmp, &blknum)) != 0) { in tarfs_alloc_mount()
920 *tmpp = tmp; in tarfs_alloc_mount()
922 TARFS_DPF(ALLOC, "%s: pfsmnt_root %p\n", __func__, tmp->root); in tarfs_alloc_mount()
926 tarfs_free_mount(tmp); in tarfs_alloc_mount()
939 struct tarfs_mount *tmp = NULL; in tarfs_mount() local
1020 error = tarfs_alloc_mount(mp, vp, root_uid, root_gid, root_mode, &tmp); in tarfs_mount()
1065 struct tarfs_mount *tmp; in tarfs_unmount() local
1080 tmp = MP_TO_TARFS_MOUNT(mp); in tarfs_unmount()
1081 vp = tmp->vp; in tarfs_unmount()
1089 tarfs_free_mount(tmp); in tarfs_unmount()
1121 struct tarfs_mount *tmp; in tarfs_statfs() local
1123 tmp = MP_TO_TARFS_MOUNT(mp); in tarfs_statfs()
1126 sbp->f_iosize = tmp->iosize; in tarfs_statfs()
1127 sbp->f_blocks = tmp->nblocks; in tarfs_statfs()
1130 sbp->f_files = tmp->nfiles; in tarfs_statfs()
1144 struct tarfs_mount *tmp; in tarfs_vget() local
1165 tmp = MP_TO_TARFS_MOUNT(mp); in tarfs_vget()
1168 error = vget(tmp->znode, lkflags); in tarfs_vget()
1171 *vpp = tmp->znode; in tarfs_vget()
1176 TAILQ_FOREACH(tnp, &tmp->allnodes, entries) { in tarfs_vget()