Subject: kern/22685: NFS client does not work with wtpref/wtmax of 8192
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <der.eremit@email.de>
List: netbsd-bugs
Date: 09/04/2003 19:43:31
>Number: 22685
>Category: kern
>Synopsis: NFS client does not work with wtpref/wtmax of 8192
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Sep 04 19:44:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Pascal Schmidt
>Release: 1.6.1
>Organization:
>Environment:
i386 GENERIC
>Description:
When mounting an NFS volume from an NFS server that advertises a maximum and preferred write size of 8192 bytes, the NetBSD NFS client code attempts to send 8192 byte writes, but does not send the full 8192 bytes of data in the request. Only around 7900 bytes are sent. That causes an RPC error on the server, and data on the server is unchanged. This repeats until we get to a write operation that sends less than 7900 bytes. This last request succeeds on the server, while the rest of the data was not written to the server's disk.
This means writing more than about 7900 bytes to a file on the NFS volume will fail, and only the last part of the data will make it onto the server.
When looking at the request sent by NetBSD via ethereal, the outgoing requests already have the data portion truncated.
Changing the server to report wtpref/wtmax of 4096 hides the bug, but
costs performance since smaller write requests are generated.
>How-To-Repeat:
mount /mnt/nfs from a server with wtpref/wtmax 8192
rm /mnt/nfs/services
cp /etc/services /mnt/nfs
result: error message from cp, first 8192 bytes of the file filled with 0, rest of the data is okay
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: