From owner-cvs-src@FreeBSD.ORG Tue Aug 28 20:50:41 2007 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE6EA16A41A; Tue, 28 Aug 2007 20:50:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB7A13C467; Tue, 28 Aug 2007 20:50:41 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.8k2) with ESMTP id 205854564-1834499 for multiple; Tue, 28 Aug 2007 16:50:10 -0400 Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.8/8.13.8) with ESMTP id l7SKoP1o041231; Tue, 28 Aug 2007 16:50:25 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: src-committers@freebsd.org Date: Tue, 28 Aug 2007 16:50:20 -0400 User-Agent: KMail/1.9.6 References: <200708282028.l7SKSD4u028065@repoman.freebsd.org> In-Reply-To: <200708282028.l7SKSD4u028065@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708281650.20825.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 28 Aug 2007 16:50:25 -0400 (EDT) X-Virus-Scanned: ClamAV 0.88.3/4088/Tue Aug 28 07:51:32 2007 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: cvs-src@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/compat/freebsd32 freebsd32_misc.c src/sys/kern vfs_syscalls.c src/sys/sys mount.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2007 20:50:42 -0000 On Tuesday 28 August 2007 04:28:12 pm John Baldwin wrote: > jhb 2007-08-28 20:28:12 UTC > > FreeBSD src repository > > Modified files: > sys/compat/freebsd32 freebsd32_misc.c > sys/kern vfs_syscalls.c > sys/sys mount.h > Log: > Rework the routines to convert a 5.x+ statfs structure (with fixed-size > 64-bit counters) to a 4.x statfs structure (with long-sized counters). > - For block counters, we scale up the block size sufficiently large so > that the resulting block counts fit into a the long-sized (long for the > ABI, so 32-bit in freebsd32) counters. In 4.x the NFS client's statfs > VOP did this already. This can lie about the block size to 4.x > binaries, but it presents a more accurate picture of the ratios of free > and available space. > - For non-block counters, fix the freebsd32 stats converter to cap the > values at INT32_MAX rather than losing the upper 32-bits to match the > behavior of the 4.x statfs conversion routine in vfs_syscalls.c I'm open to suggestion on this point. I can see that for the true counters (like read/write operation counters) it might be more correct for them to wrap and just lose the upper 32-bits than to cap them. -- John Baldwin