From owner-freebsd-bugs Wed May 9 12:40: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 3DA7E37B423 for ; Wed, 9 May 2001 12:40:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f49Je3h44767; Wed, 9 May 2001 12:40:03 -0700 (PDT) (envelope-from gnats) Date: Wed, 9 May 2001 12:40:03 -0700 (PDT) Message-Id: <200105091940.f49Je3h44767@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Garrett Wollman Subject: kern/27232: On NFSv3 mounted filesystems, stat returns st_blksize=512 Reply-To: Garrett Wollman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/27232; it has been noted by GNATS. From: Garrett Wollman To: conrad@th.physik.uni-bonn.de Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: kern/27232: On NFSv3 mounted filesystems, stat returns st_blksize=512 Date: Wed, 9 May 2001 15:38:20 -0400 (EDT) < On NFSv3 mounts, stat returns st_blksize=512 for every regular file. > This in turn is used by libc routines as a default buffer size, as it > should be the 'optimal' io blocksize. No. It should be the block size used by the underlying filesystem's block allocator, and in which the file's `st_blocks' size-on-disk is reported. While SUS describes it as a ``preferred'' block size, and the FreeBSD manual pages describe it as ``optimal ... for I/O'', the most important meaning of this field is as a multiplier of st_blocks to determine the file's size. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message