diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-06-12 06:44:17 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-06-12 06:44:17 +0000 |
commit | 11ae183db4029474658e0aedf2d6e5ec178c148e (patch) | |
tree | 2cffd7ee3ef705d7272e3e930627fb7e34920560 /sys | |
parent | 10f0a131e499c68af4adaeb65fc0bdf304496226 (diff) |
Actually return an error in nfs_asyncio() if we fail to process
the buf due too all of the nfs iod's being busy; this downgrades
the write to a sync one and allows to handle this.
ok art@, beck@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/nfs/nfs_bio.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/nfs/nfs_bio.c b/sys/nfs/nfs_bio.c index 446b097a528..5fa106e310f 100644 --- a/sys/nfs/nfs_bio.c +++ b/sys/nfs/nfs_bio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_bio.c,v 1.47 2008/06/11 04:52:27 blambert Exp $ */ +/* $OpenBSD: nfs_bio.c,v 1.48 2008/06/12 06:44:16 thib Exp $ */ /* $NetBSD: nfs_bio.c,v 1.25.4.2 1996/07/08 20:47:04 jtc Exp $ */ /* @@ -545,7 +545,7 @@ int nfs_asyncio(bp) struct buf *bp; { - int i,s; + int i; if (nfs_numasync == 0) return (EIO); @@ -569,17 +569,7 @@ nfs_asyncio(bp) if (bp->b_flags & (B_READ | B_WRITEINPROG | B_NOCACHE)) return (EIO); - /* - * Just turn the async write into a delayed write, instead of - * doing in synchronously. Hopefully, at least one of the nfsiods - * is currently doing a write for this file and will pick up the - * delayed writes before going back to sleep. - */ - s = splbio(); - buf_dirty(bp); - biodone(bp); - splx(s); - return (0); + return (EIO); } /* |