diff options
author | 2011-02-15 20:02:11 +0000 | |
---|---|---|
committer | 2011-02-15 20:02:11 +0000 | |
commit | 3f25bb99e9ba62a774783f585590ec0b1817efa2 (patch) | |
tree | 24dfd629b99a0102ea05e5374c40eb01798c22c8 /sys/dev/vnd.c | |
parent | Add workaround for BCM5906 A0/1/2 controller silicon bug. When (diff) | |
download | wireguard-openbsd-3f25bb99e9ba62a774783f585590ec0b1817efa2.tar.xz wireguard-openbsd-3f25bb99e9ba62a774783f585590ec0b1817efa2.zip |
A vnd buf doesn't only go through the vnd bufq but also the bufq
for the device on which the vnd image resides on, this has the
effect that a bufq_done call is done in the context of the
underlaying bufq, setting b_bq to NULL, meaning there is never
a bufq_done call done for the vnd bufq so the outstanding count
never decreses.
Add one in vndiodone. This fixes the suspsend issues krw@ was
running into.
ok tedu@, krw@
nod from miod@ on the commit.
Diffstat (limited to 'sys/dev/vnd.c')
-rw-r--r-- | sys/dev/vnd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/vnd.c b/sys/dev/vnd.c index 0a18e297a8b..a663d061d61 100644 --- a/sys/dev/vnd.c +++ b/sys/dev/vnd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vnd.c,v 1.106 2011/01/06 17:32:42 thib Exp $ */ +/* $OpenBSD: vnd.c,v 1.107 2011/02/15 20:02:11 thib Exp $ */ /* $NetBSD: vnd.c,v 1.26 1996/03/30 23:06:11 christos Exp $ */ /* @@ -671,6 +671,12 @@ vndiodone(struct buf *bp) } out: + /* + * A bufq_done call is actually done on this buf in the context + * of the bufq for the device on which the vnd image resides on. + * Meaning we have to do one ourselves too. + */ + bufq_done(&vnd->sc_bufq, bp); putvndbuf(vbp); disk_unbusy(&vnd->sc_dk, (pbp->b_bcount - pbp->b_resid), (pbp->b_flags & B_READ)); |