Call for non i386/amd64 testers for tmpfs
Craig Boston
craig at xfoil.gank.org
Tue Jul 24 16:42:18 UTC 2007
On Wed, Jul 25, 2007 at 12:16:59AM +0800, Xin LI wrote:
> I'd like to request that some owners of non-i386/amd64 boxes to test
> sys/modules/tmpfs and report if it would work correctly on other
> architectures, so I will be able to determine if it is appropriate to
> connect it to build on these architectures (and perhaps pick out more
> bugs :)
Hi, funny you should post just now. It's for i386 but I just submitted
a PR about tmpfs :-)
Details are in kern/114870, but basically there's an overflow problem on
32-bit systems with a large amount of swap.
Here's the quick fix that I attached to the PR:
=== sys/fs/tmpfs/tmpfs_vfsops.c
==================================================================
--- sys/fs/tmpfs/tmpfs_vfsops.c (revision 777)
+++ sys/fs/tmpfs/tmpfs_vfsops.c (local)
@@ -268,7 +268,7 @@
mtx_init(&tmp->allnode_lock, "tmpfs allnode lock", NULL, MTX_DEF);
tmp->tm_nodes_max = nodes;
tmp->tm_nodes_inuse = 0;
- tmp->tm_maxfilesize = get_swpgtotal() * PAGE_SIZE;
+ tmp->tm_maxfilesize = (u_int64_t)get_swpgtotal() * PAGE_SIZE;
LIST_INIT(&tmp->tm_nodes_used);
tmp->tm_pages_max = pages;
More information about the freebsd-current
mailing list