From owner-freebsd-current@FreeBSD.ORG Tue Jul 24 16:42:18 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C48716A417 for ; Tue, 24 Jul 2007 16:42:18 +0000 (UTC) (envelope-from craig@xfoil.gank.org) Received: from ion.gank.org (ion.gank.org [69.55.238.164]) by mx1.freebsd.org (Postfix) with ESMTP id 055A413C45D for ; Tue, 24 Jul 2007 16:42:17 +0000 (UTC) (envelope-from craig@xfoil.gank.org) Received: by ion.gank.org (Postfix, from userid 1001) id C77F611253; Tue, 24 Jul 2007 11:42:17 -0500 (CDT) Date: Tue, 24 Jul 2007 11:42:16 -0500 From: Craig Boston To: Xin LI Message-ID: <20070724164215.GA3329@nowhere> Mail-Followup-To: Craig Boston , Xin LI , freebsd-current@freebsd.org References: <46A625FB.5050105@delphij.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46A625FB.5050105@delphij.net> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: Call for non i386/amd64 testers for tmpfs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jul 2007 16:42:18 -0000 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;