This doesn't resolve panics from running fsstress on tmpfs, but it is a first
step towards solving these problems. No consideration of multiple tmpfs mounts
at the minute either.
KKASSERT(IFF(type == VLNK, target != NULL));
KKASSERT(IFF(type == VBLK || type == VCHR, rmajor != VNOVAL));
- if (tmp->tm_nodes_inuse > tmp->tm_nodes_max)
+ if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max)
return (ENOSPC);
nnode = (struct tmpfs_node *)objcache_get(tmp->tm_node_pool, M_WAITOK);
tmp->tm_pages_max = pages;
tmp->tm_pages_used = 0;
+ kmalloc_raise_limit(M_TMPFS_NODE, sizeof(struct tmpfs_node) *
+ tmp->tm_nodes_max);
+
tmp->tm_dirent_pool = objcache_create( "tmpfs dirent cache",
0, 0,
NULL, NULL, NULL,