From owner-cvs-all@FreeBSD.ORG Tue Aug 28 20:28:13 2007 Return-Path: Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7031616A419; Tue, 28 Aug 2007 20:28:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 5B28313C45B; Tue, 28 Aug 2007 20:28:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l7SKSDQg028066; Tue, 28 Aug 2007 20:28:13 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from jhb@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l7SKSD4u028065; Tue, 28 Aug 2007 20:28:13 GMT (envelope-from jhb) Message-Id: <200708282028.l7SKSD4u028065@repoman.freebsd.org> From: John Baldwin Date: Tue, 28 Aug 2007 20:28:12 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/compat/freebsd32 freebsd32_misc.c src/sys/kern vfs_syscalls.c src/sys/sys mount.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Aug 2007 20:28:13 -0000 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 Approved by: re (kensmith) Revision Changes Path 1.67 +9 -9 src/sys/compat/freebsd32/freebsd32_misc.c 1.442 +46 -4 src/sys/kern/vfs_syscalls.c 1.227 +1 -0 src/sys/sys/mount.h