Re: Call for non i386/amd64 testers for tmpfs

From: Craig Boston <craig_at_xfoil.gank.org>
Date: Tue, 24 Jul 2007 11:42:16 -0500
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)
_at__at_ -268,7 +268,7 _at__at_
        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;
Received on Tue Jul 24 2007 - 14:42:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC