Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2007 11:42:16 -0500
From:      Craig Boston <craig@xfoil.gank.org>
To:        Xin LI <delphij@delphij.net>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Call for non i386/amd64 testers for tmpfs
Message-ID:  <20070724164215.GA3329@nowhere>
In-Reply-To: <46A625FB.5050105@delphij.net>
References:  <46A625FB.5050105@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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;




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070724164215.GA3329>