Re: git: NFS - Properly handle NFSv3 EOF short-reads
This was originally reported by Thomas Nikolajsen on issue 844
(http://bugs.dragonflybsd.org/issue844)
2009/8/25 Matthew Dillon <dillon@crater.dragonflybsd.org>:
>
> commit 28953d39b23eec3fbd96a46ca2c4946bfe8d1a61
> Author: Matthew Dillon <dillon@apollo.backplane.com>
> Date: =A0 Mon Aug 24 15:41:42 2009 -0700
>
> =A0 =A0NFS - Properly handle NFSv3 EOF short-reads
>
> =A0 =A0* Short reads were not causing the remainder of the buffer to be
> =A0 =A0 =A0zero'd out in all cases, causing the fsx filesystem test to fa=
il.
>
> =A0 =A0* An EOF condition was sometimes improperly reporting a non-zero
> =A0 =A0 =A0bp->b_resid. =A0Race against the server where the client's ide=
a of
> =A0 =A0 =A0the file size differs from the server could result in a non-ze=
ro
> =A0 =A0 =A0bp->b_resid after a BIO.
>
> =A0 =A0 =A0Zero out the remaining space and and set bp->b_resid to 0. =A0=
The
> =A0 =A0 =A0NFS client code always specifies buffers within the bounds of
> =A0 =A0 =A0the file.
>
> =A0 =A0Reported-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
>
> Summary of changes:
> =A0sys/vfs/nfs/nfs_bio.c =A0 | =A0136 ++++++++++++++++++++++-------------=
-----------
> =A0sys/vfs/nfs/nfs_vnops.c | =A0 31 ++++++++---
> =A02 files changed, 89 insertions(+), 78 deletions(-)
>
> http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/28953d39b23eec3fb=
d96a46ca2c4946bfe8d1a61
>
>
> --
> DragonFly BSD source repository
>
討論串 (同標題文章)