freebsd-skq/sys/nfs
Matthew Dillon b7303db36e Fix two problems: First, fix the append seek position race that can
occur due to np->n_size potentially changing if nfs_getcacheblk()
    blocks in nfs_write().

    Second, under -current we must supply the proper bufsize when obtaining
    buffers that straddle the EOF, but due to the fact that np->n_size can
    change out from under us it is possible that we may specify the wrong
    buffer size and wind up truncating dirty data written by another
    process.

    Both problems are solved by implementing nfs_rslock(), which allows us
    to lock around sensitive buffer cache operations such as those that
    occur when appending to a file.

    It is believed that this race is responsible for causing dirtyoff/dirtyend
    and (in stable) validoff/validend to exceed the buffer size.  Therefore
    we have now added a warning printf for the dirtyoff/end case in current.

    However, we have introduced a new problem which we need to fix at some
    point, and that is that soft or intr NFS mounts may become
    uninterruptable from the point of view of process A which is stuck waiting
    on rslock while process B is stuck doing the rpc.  To unstick process A,
    process B would have to be interrupted first.

Reviewed by:	Alfred Perlstein <bright@wintelcom.net>
1999-12-14 19:07:54 +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 Fix two problems: First, fix the append seek position race that can 1999-12-14 19:07:54 +00:00
nfs_common.c Fix a number of server-side issues related to aborting badly formed 1999-12-12 07:06:39 +00:00
nfs_common.h $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
nfs_node.c Fix two problems: First, fix the append seek position race that can 1999-12-14 19:07:54 +00:00
nfs_nqlease.c Fix a number of server-side issues related to aborting badly formed 1999-12-12 07:06:39 +00:00
nfs_serv.c Add a readahead heuristic to the NFS server side code. While the server 1999-12-13 17:34:45 +00:00
nfs_socket.c Fix a timeout deadlock that can occur when the process holding the 1999-12-13 04:24:55 +00:00
nfs_srvcache.c PR: kern/15222 1999-12-13 17:07:03 +00:00
nfs_subs.c Fix a number of server-side issues related to aborting badly formed 1999-12-12 07:06:39 +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 Fix two problems: First, fix the append seek position race that can 1999-12-14 19:07:54 +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