summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_bio.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2003-05-31 16:42:45 +0000
committerphk <phk@FreeBSD.org>2003-05-31 16:42:45 +0000
commit0129a20107a4d816f5acb9c683952803b97583be (patch)
tree5bac77896fbd3b5412e6f42140c8335ad91f96d2 /sys/kern/vfs_bio.c
parent8c39502975cf4f5d36d87e3991fb70ba5ce2f8ac (diff)
downloadFreeBSD-src-0129a20107a4d816f5acb9c683952803b97583be.zip
FreeBSD-src-0129a20107a4d816f5acb9c683952803b97583be.tar.gz
The IO_NOWDRAIN and B_NOWDRAIN hacks are no longer needed to prevent
deadlocks with vnode backed md(4) devices because md now uses a kthread to run the bio requests instead of doing it directly from the bio down path.
Diffstat (limited to 'sys/kern/vfs_bio.c')
-rw-r--r--sys/kern/vfs_bio.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index 0b4a643..e1c0f9e 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -882,13 +882,10 @@ bwrite(struct buf * bp)
int rtval = bufwait(bp);
brelse(bp);
return (rtval);
- } else if ((oldflags & B_NOWDRAIN) == 0) {
+ } else {
/*
* don't allow the async write to saturate the I/O
- * system. Deadlocks can occur only if a device strategy
- * routine (like in MD) turns around and issues another
- * high-level write, in which case B_NOWDRAIN is expected
- * to be set. Otherwise we will not deadlock here because
+ * system. We will not deadlock here because
* we are blocking waiting for I/O that is already in-progress
* to complete.
*/
@@ -1461,8 +1458,7 @@ brelse(struct buf * bp)
if (bp->b_bufsize || bp->b_kvasize)
bufspacewakeup();
- bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF |
- B_DIRECT | B_NOWDRAIN);
+ bp->b_flags &= ~(B_ASYNC | B_NOCACHE | B_AGE | B_RELBUF | B_DIRECT);
if ((bp->b_flags & B_DELWRI) == 0 && (bp->b_xflags & BX_VNDIRTY))
panic("brelse: not dirty");
/* unlock */
OpenPOWER on IntegriCloud