diff options
author | 2011-07-07 16:50:15 +0000 | |
---|---|---|
committer | 2011-07-07 16:50:15 +0000 | |
commit | 5b37a674518d2cb2e40b716576887d9794306917 (patch) | |
tree | 576ac0c0452ffda5a484c8136a93c769d7f884a2 /sys/kern/kern_physio.c | |
parent | Enable wide character functions in libedit (not the other libe*t). (diff) | |
download | wireguard-openbsd-5b37a674518d2cb2e40b716576887d9794306917.tar.xz wireguard-openbsd-5b37a674518d2cb2e40b716576887d9794306917.zip |
set flags correctly in physio - now with actual clearing of B_DONE and B_ERROR
between re-use of the same buffer to re-call strategy() - large dd's now
work again which were broken by my last commit of this.
ok krw@
Diffstat (limited to 'sys/kern/kern_physio.c')
-rw-r--r-- | sys/kern/kern_physio.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 9264872a2e2..75ddfc62403 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_physio.c,v 1.37 2011/07/07 08:55:38 dhill Exp $ */ +/* $OpenBSD: kern_physio.c,v 1.38 2011/07/07 16:50:15 beck Exp $ */ /* $NetBSD: kern_physio.c,v 1.28 1997/05/19 10:43:28 pk Exp $ */ /*- @@ -105,7 +105,8 @@ physio(void (*strategy)(struct buf *), dev_t dev, int flags, * "Set by physio for raw transfers.", in addition * to the "busy" and read/write flag.) */ - bp->b_flags = B_BUSY | B_PHYS | B_RAW | flags; + CLR(bp->b_flags, B_DONE | B_ERROR); + bp->b_flags |= (B_BUSY | B_PHYS | B_RAW | flags); /* [set up the buffer for a maximum-sized transfer] */ bp->b_blkno = btodb(uio->uio_offset); |