Lines Matching defs:tmp

326 	struct tmpfs_mount *tmp;
348 tmp = VFS_TO_TMPFS(mp);
357 if (size_max != tmp->tm_size_max)
361 tmp->tm_ea_memory_max = ea_max_size;
364 !tmp->tm_ronly) {
368 tmp->tm_ronly) {
370 tmp->tm_ronly = 0;
375 tmp->tm_nomtime = vfs_getopt(mp->mnt_optnew, "nomtime", NULL,
443 tmp = (struct tmpfs_mount *)malloc(sizeof(struct tmpfs_mount),
446 mtx_init(&tmp->tm_allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF);
447 tmp->tm_nodes_max = nodes_max;
448 tmp->tm_nodes_inuse = 0;
449 tmp->tm_ea_memory_inuse = 0;
450 tmp->tm_refcount = 1;
451 tmp->tm_maxfilesize = maxfilesize > 0 ? maxfilesize : OFF_MAX;
452 tmp->tm_ea_memory_max = ea_max_size > 0 ?
454 LIST_INIT(&tmp->tm_nodes_used);
456 tmp->tm_size_max = size_max;
457 tmp->tm_pages_max = pages;
458 tmp->tm_pages_used = 0;
459 new_unrhdr64(&tmp->tm_ino_unr, 2);
460 tmp->tm_ronly = (mp->mnt_flag & MNT_RDONLY) != 0;
461 tmp->tm_nonc = nonc;
462 tmp->tm_nomtime = nomtime;
463 tmp->tm_pgread = pgread;
466 error = tmpfs_alloc_node(mp, tmp, VDIR, root_uid, root_gid,
470 free(tmp, M_TMPFSMNT);
475 tmp->tm_root = root;
485 mp->mnt_data = tmp;
497 struct tmpfs_mount *tmp;
502 tmp = VFS_TO_TMPFS(mp);
531 TMPFS_LOCK(tmp);
532 while ((node = LIST_FIRST(&tmp->tm_nodes_used)) != NULL) {
535 tmpfs_dir_destroy(tmp, node);
536 if (tmpfs_free_node_locked(tmp, node, true))
537 TMPFS_LOCK(tmp);
543 tmpfs_free_tmp(tmp);
550 tmpfs_free_tmp(struct tmpfs_mount *tmp)
552 TMPFS_MP_ASSERT_LOCKED(tmp);
553 MPASS(tmp->tm_refcount > 0);
555 tmp->tm_refcount--;
556 if (tmp->tm_refcount > 0) {
557 TMPFS_UNLOCK(tmp);
560 TMPFS_UNLOCK(tmp);
562 mtx_destroy(&tmp->tm_allnode_lock);
564 * We cannot assert that tmp->tm_pages_used == 0 there,
568 MPASS(tmp->tm_nodes_inuse == 0);
570 free(tmp, M_TMPFSMNT);
589 struct tmpfs_mount *tmp;
602 tmp = VFS_TO_TMPFS(mp);
604 if (tfd.tfd_id >= tmp->tm_nodes_max)
607 TMPFS_LOCK(tmp);
608 LIST_FOREACH(node, &tmp->tm_nodes_used, tn_entries) {
615 TMPFS_UNLOCK(tmp);
619 tmpfs_free_node(tmp, node);
629 struct tmpfs_mount *tmp;
632 tmp = VFS_TO_TMPFS(mp);
637 used = tmpfs_pages_used(tmp);
638 if (tmp->tm_pages_max != ULONG_MAX)
639 sbp->f_blocks = tmp->tm_pages_max;
647 used = tmp->tm_nodes_inuse;
648 sbp->f_files = tmp->tm_nodes_max;
653 /* sbp->f_owner = tmp->tn_uid; */
712 db_print_tmpfs(struct mount *mp, struct tmpfs_mount *tmp)
714 db_printf("mp %p (%s) tmp %p\n", mp,
715 mp->mnt_stat.f_mntonname, tmp);
720 (uintmax_t)tmp->tm_size_max, tmp->tm_pages_max, tmp->tm_pages_used,
721 (uintmax_t)tmp->tm_nodes_max, (uintmax_t)tmp->tm_nodes_inuse,
722 (uintmax_t)tmp->tm_ea_memory_inuse, (uintmax_t)tmp->tm_refcount,
723 (uintmax_t)tmp->tm_maxfilesize,
724 tmp->tm_ronly ? 'o' : 'w', tmp->tm_nonc ? "no" : "",
725 tmp->tm_nomtime ? "no" : "");
731 struct tmpfs_mount *tmp;
735 tmp = VFS_TO_TMPFS(mp);
736 db_print_tmpfs(mp, tmp);
743 tmp = VFS_TO_TMPFS(mp);
744 db_print_tmpfs(mp, tmp);