summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid6.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2013-03-29 12:01:00 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2013-03-29 12:01:00 +0000
commit92c0e33ea787b128490e03841f0eb28272c4bc1d (patch)
treeaffa95b477129686756cc0a5480a327fad646ce0 /sys/dev/softraid_raid6.c
parent47402ef2aa149da75c4b1dba5a74866f852074f1 (diff)
Decouple wakeups on work unit completion from the type of I/O being
performed. ok krw@
Diffstat (limited to 'sys/dev/softraid_raid6.c')
-rw-r--r--sys/dev/softraid_raid6.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/softraid_raid6.c b/sys/dev/softraid_raid6.c
index 1eeff435468..0283516d938 100644
--- a/sys/dev/softraid_raid6.c
+++ b/sys/dev/softraid_raid6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid6.c,v 1.37 2013/03/29 11:46:45 jsing Exp $ */
+/* $OpenBSD: softraid_raid6.c,v 1.38 2013/03/29 12:00:59 jsing Exp $ */
/*
* Copyright (c) 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2009 Jordan Hargrave <jordan@openbsd.org>
@@ -819,13 +819,11 @@ sr_raid6_intr(struct buf *bp)
sr_raid_startwu(wu->swu_collider);
}
- if (wu->swu_flags & SR_WUF_REBUILD) {
- /* XXX - decouple from SCSI_DATA_OUT. */
- if (wu->swu_xs->flags & SCSI_DATA_OUT) {
- wu->swu_flags |= SR_WUF_REBUILDIOCOMP;
- wakeup(wu);
- }
- } else {
+ if (wu->swu_flags & SR_WUF_REBUILD)
+ wu->swu_flags |= SR_WUF_REBUILDIOCOMP;
+ if (wu->swu_flags & SR_WUF_WAKEUP)
+ wakeup(wu);
+ if (!(wu->swu_flags & SR_WUF_REBUILD)) {
if (xs == NULL) {
scsi_io_put(&sd->sd_iopool, wu);
if (sd->sd_sync && sd->sd_wu_pending == 0)