Date: Tue, 28 Aug 2007 16:50:20 -0400 From: John Baldwin <jhb@freebsd.org> To: src-committers@freebsd.org 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 Message-ID: <200708281650.20825.jhb@freebsd.org> In-Reply-To: <200708282028.l7SKSD4u028065@repoman.freebsd.org> References: <200708282028.l7SKSD4u028065@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708281650.20825.jhb>