diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2011-02-15 20:02:12 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2011-02-15 20:02:12 +0000 |
commit | 88f82e3f69f8d78515e02ac319b8e08c1ca81f17 (patch) | |
tree | 8407a9bd691ebfbd8271f6ae3eb4c61e318ec148 | |
parent | 5aed391d332653d29a2fa64f5d60e06fc3a454b3 (diff) |
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.
-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)); |