Subject: Re: NFS v3 `used file bytes'
To: Paul Kranenburg <pk@cs.few.eur.nl>
From: Frank van der Linden <frank@fwi.uva.nl>
List: tech-kern
Date: 02/27/1996 11:20:52
Quoting Paul Kranenburg,

> I've NFSv3-mounted a filesystem from a SunOS 5.5 machine on a NetBSD-current
> (both sparc & i386) machine. It looks like `ls -ls' output is off by a factor
> of 16. Witness:

> % cp /bin/sh mnt
> % cd /mnt
> % ls -ls
> 11520 -r-xr-xr-x  1 pk  system  360448 Feb 27 10:35 sh

> whereas locally (and on the SunOS5.5 host)

> % cd /bin
> % ls -ls
>  720 -r-xr-xr-x   1 pk       staff     360448 Feb 27 10:35 sh

> It seems that the `va_bytes' field in the getattr() reply is really this
> big (512 * 11520); verified by looking at the raw ethernet packet.

> `ls -ls' on SunOS 5.5, mounting v3 from NetBSD results in really small
> `file blocks' values.

I can't test with Solaris at the moment, but it seems that the NetBSD
side always (erroneously?) assumes that the blocksize of an NFS filesystem
is 512 bytes. However, Solaris 2.5/SunOS5.5 seems to report the same blocksize
as it does locally: 8192 bytes (note that 8192/512 is 16..).

- Frank