Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Dec 1999 11:07:56 -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_node.c nfsnode.h
Message-ID:  <199912141907.LAA96730@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
dillon      1999/12/14 11:07:56 PST

  Modified files:
    sys/nfs              nfs_bio.c nfs_node.c nfsnode.h 
  Log:
      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>
  
  Revision  Changes    Path
  1.82      +124 -48   src/sys/nfs/nfs_bio.c
  1.34      +2 -1      src/sys/nfs/nfs_node.c
  1.30      +27 -1     src/sys/nfs/nfsnode.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?199912141907.LAA96730>