Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Dec 1999 22:09:58 -0800 (PST)
From:      Matt Dillon <dillon@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/nfs nfs_bio.c nfs_subs.c nfs_vnops.c src/sys/sys buf.h
Message-ID:  <199912120609.WAA18657@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
dillon      1999/12/11 22:09:58 PST

  Modified files:
    sys/nfs              nfs_bio.c nfs_subs.c nfs_vnops.c 
    sys/sys              buf.h 
  Log:
      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>
  
  Revision  Changes    Path
  1.81      +27 -11    src/sys/nfs/nfs_bio.c
  1.86      +15 -7     src/sys/nfs/nfs_subs.c
  1.148     +3 -27     src/sys/nfs/nfs_vnops.c
  1.85      +8 -1      src/sys/sys/buf.h



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912120609.WAA18657>