summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raidp.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_raidp.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_raidp.c')
-rw-r--r--sys/dev/softraid_raidp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/softraid_raidp.c b/sys/dev/softraid_raidp.c
index 848db4d7413..3e5a22f5167 100644
--- a/sys/dev/softraid_raidp.c
+++ b/sys/dev/softraid_raidp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raidp.c,v 1.9 2009/08/04 20:17:14 jordan Exp $ */
+/* $OpenBSD: softraid_raidp.c,v 1.10 2009/08/09 14:12:25 marco Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -729,7 +729,9 @@ sr_raidp_addio(struct sr_workunit *wu, int dsk, daddr64_t blk, daddr64_t len,
ccb->ccb_buf.b_error = 0;
ccb->ccb_buf.b_proc = curproc;
ccb->ccb_buf.b_dev = sd->sd_vol.sv_chunks[dsk]->src_dev_mm;
- ccb->ccb_buf.b_vp = NULL;
+ ccb->ccb_buf.b_vp = sd->sd_vol.sv_chunks[dsk]->src_vn;
+ if ((ccb->ccb_buf.b_flags & B_READ) == 0)
+ ccb->ccb_buf.b_vp->v_numoutput++;
ccb->ccb_wu = wu;
ccb->ccb_target = dsk;