freebsd-dev/sys/nfs
Matthew Dillon ea94c7b968 Synopsis of problem being fixed: Dan Nelson originally reported that
blocks of zeros could wind up in a file written to over NFS by a client.
    The problem only occurs a few times per several gigabytes of data.   This
    problem turned out to be bug #3 below.

    bug #1:

        B_CLUSTEROK must be cleared when an NFS buffer is reverted from
        stage 2 (ready for commit rpc) to stage 1 (ready for write).
        Reversions can occur when a dirty NFS buffer is redirtied with new
        data.

        Otherwise the VFS/BIO system may end up thinking that a stage 1
        NFS buffer is clusterable.  Stage 1 NFS buffers are not clusterable.

    bug #2:

        B_CLUSTEROK was inappropriately set for a 'short' NFS buffer (short
        buffers only occur near the EOF of the file).  Change to only set
        when the buffer is a full biosize (usually 8K).  This bug has no
        effect but should be fixed in -current anyway.  It need not be
        backported.

    bug #3:

        B_NEEDCOMMIT was inappropriately set in nfs_flush() (which is
	typically only called by the update daemon).  nfs_flush()
        does a multi-pass loop but due to the lack of vnode locking it
        is possible for new buffers to be added to the dirtyblkhd list
        while a flush operation is going on.  This may result in nfs_flush()
        setting B_NEEDCOMMIT on a buffer which has *NOT* yet gone through its
        stage 1 write, causing only the commit rpc to be made and thus
        causing the contents of the buffer to be thrown away (never sent to
        the server).

    The patch also contains some cleanup, which only applies to the commit
    into -current.

Reviewed by:	dg, julian
Originally Reported by: Dan Nelson <dnelson@emsphone.com>
1999-12-12 06:09:57 +00:00
..
bootp_subr.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
krpc_subr.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
krpc.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfs_bio.c Synopsis of problem being fixed: Dan Nelson originally reported that 1999-12-12 06:09:57 +00:00
nfs_common.c Synopsis of problem being fixed: Dan Nelson originally reported that 1999-12-12 06:09:57 +00:00
nfs_common.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfs_node.c Lock reporting and assertion changes. 1999-12-11 16:13:02 +00:00
nfs_nqlease.c struct mountlist and struct mount.mnt_list have no business being 1999-11-20 10:00:46 +00:00
nfs_serv.c Remove WILLRELE from VOP_SYMLINK 1999-11-13 20:58:17 +00:00
nfs_socket.c nm_srtt and nm_sdrtt are arrays[4]. Remove explicit initialization 1999-11-22 04:50:09 +00:00
nfs_srvcache.c $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfs_subs.c Synopsis of problem being fixed: Dan Nelson originally reported that 1999-12-12 06:09:57 +00:00
nfs_syscalls.c Remove special case socket sharing code in order to allow nfsd to 1999-11-11 17:24:02 +00:00
nfs_vfsops.c Lock reporting and assertion changes. 1999-12-11 16:13:02 +00:00
nfs_vnops.c Synopsis of problem being fixed: Dan Nelson originally reported that 1999-12-12 06:09:57 +00:00
nfs.h Move NFS access cache hits/misses into nfsstats structure so 1999-10-25 19:22:33 +00:00
nfsdiskless.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsm_subs.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsmount.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsnode.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsproto.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsrtt.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsrvcache.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfsv2.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nqnfs.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
rpcv2.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
xdr_subs.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00