aboutsummaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorMatthew Dillon <dillon@FreeBSD.org>2001-02-28 04:13:11 +0000
committerMatthew Dillon <dillon@FreeBSD.org>2001-02-28 04:13:11 +0000
commit63692125a9e8ed90facebd1b3a159cef68b9ff35 (patch)
treecd043c953d297ad04972b60c84ba8b242fa97126 /sys/nfs
parentfab9e3acacc03fd912826a793620b50cfd5684f0 (diff)
downloadsrc-63692125a9e8ed90facebd1b3a159cef68b9ff35.tar.gz
src-63692125a9e8ed90facebd1b3a159cef68b9ff35.zip
Fix lockup for loopback NFS mounts. The pipelined I/O limitations could be
hit on the client side and prevent the server side from retiring writes. Pipeline operations turned off for all READs (no big loss since reads are usually synchronous) and for NFS writes, and left on for the default bwrite(). (MFC expected prior to 4.3 freeze) Testing by: mjacob, dillon
Notes
Notes: svn path=/head/; revision=73211
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_vnops.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 37b977ca53d5..d889cf433db8 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -2869,6 +2869,9 @@ again:
* NOTE: we are not clearing B_DONE here, so we have
* to do it later on in this routine if we intend to
* initiate I/O on the bp.
+ *
+ * Note: to avoid loopback deadlocks, we do not
+ * assign b_runningbufspace.
*/
if (wcred == NULL)
wcred = bp->b_wcred;
@@ -3142,7 +3145,12 @@ nfs_writebp(bp, force, procp)
curproc->p_stats->p_ru.ru_oublock++;
splx(s);
+ /*
+ * Note: to avoid loopback deadlocks, we do not
+ * assign b_runningbufspace.
+ */
vfs_busy_pages(bp, 1);
+
if (force)
bp->b_flags |= B_WRITEINPROG;
BUF_KERNPROC(bp);