summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid0.c
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2009-08-09 14:12:26 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2009-08-09 14:12:26 +0000
commit7b05469e81411324822db473427cc3b7ba400e9f (patch)
tree61daea5c42b443efecf476ea4dd8a0dc2d47338d /sys/dev/softraid_raid0.c
parentf7447304c5149566f2f214be68f03fbf69aff793 (diff)
Switch softraid to vnodes to prevent bad things from happening when using
d_open/d_close. tested by many, ok jsing, thib, krw
Diffstat (limited to 'sys/dev/softraid_raid0.c')
-rw-r--r--sys/dev/softraid_raid0.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/softraid_raid0.c b/sys/dev/softraid_raid0.c
index f438c3cc96f..1a36e3e3ba0 100644
--- a/sys/dev/softraid_raid0.c
+++ b/sys/dev/softraid_raid0.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid0.c,v 1.15 2009/06/02 21:23:11 marco Exp $ */
+/* $OpenBSD: softraid_raid0.c,v 1.16 2009/08/09 14:12:25 marco Exp $ */
/*
* Copyright (c) 2008 Marco Peereboom <marco@peereboom.us>
*
@@ -303,7 +303,9 @@ sr_raid0_rw(struct sr_workunit *wu)
B_READ : B_WRITE;
ccb->ccb_target = chunk;
ccb->ccb_buf.b_dev = sd->sd_vol.sv_chunks[chunk]->src_dev_mm;
- ccb->ccb_buf.b_vp = NULL;
+ ccb->ccb_buf.b_vp = sd->sd_vol.sv_chunks[chunk]->src_vn;
+ if ((ccb->ccb_buf.b_flags & B_READ) == 0)
+ ccb->ccb_buf.b_vp->v_numoutput++;
LIST_INIT(&ccb->ccb_buf.b_dep);
TAILQ_INSERT_TAIL(&wu->swu_ccb, ccb, ccb_link);