git: NFS - Properly handle NFSv3 EOF short-reads
Matthew Dillon
dillon at crater.dragonflybsd.org
Mon Aug 24 16:32:46 PDT 2009
commit 28953d39b23eec3fbd96a46ca2c4946bfe8d1a61
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Mon Aug 24 15:41:42 2009 -0700
NFS - Properly handle NFSv3 EOF short-reads
* Short reads were not causing the remainder of the buffer to be
zero'd out in all cases, causing the fsx filesystem test to fail.
* An EOF condition was sometimes improperly reporting a non-zero
bp->b_resid. Race against the server where the client's idea of
the file size differs from the server could result in a non-zero
bp->b_resid after a BIO.
Zero out the remaining space and and set bp->b_resid to 0. The
NFS client code always specifies buffers within the bounds of
the file.
Reported-by: Antonio Huete Jimenez <tuxillo at quantumachine.net>
Summary of changes:
sys/vfs/nfs/nfs_bio.c | 136 ++++++++++++++++++++++------------------------
sys/vfs/nfs/nfs_vnops.c | 31 ++++++++---
2 files changed, 89 insertions(+), 78 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/28953d39b23eec3fbd96a46ca2c4946bfe8d1a61
--
DragonFly BSD source repository
More information about the Commits
mailing list