summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/softraid.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index a0a190b3c7c..8a7ea44b8e6 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.309 2013/06/11 16:42:13 deraadt Exp $ */
+/* $OpenBSD: softraid.c,v 1.310 2013/07/01 11:33:21 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -2079,12 +2079,14 @@ sr_ccb_done(struct sr_ccb *ccb)
if (ccb->ccb_buf.b_flags & B_ERROR) {
DNPRINTF(SR_D_INTR, "%s: i/o error on block %lld target %d\n",
DEVNAME(sc), ccb->ccb_buf.b_blkno, ccb->ccb_target);
- if (!ISSET(sd->sd_capabilities, SR_CAP_REDUNDANT))
+ if (ISSET(sd->sd_capabilities, SR_CAP_REDUNDANT))
+ sd->sd_set_chunk_state(sd, ccb->ccb_target,
+ BIOC_SDOFFLINE);
+ else
printf("%s: i/o error on block %lld target %d "
"b_error %d\n", DEVNAME(sc), ccb->ccb_buf.b_blkno,
ccb->ccb_target, ccb->ccb_buf.b_error);
ccb->ccb_state = SR_CCB_FAILED;
- sd->sd_set_chunk_state(sd, ccb->ccb_target, BIOC_SDOFFLINE);
wu->swu_ios_failed++;
} else {
ccb->ccb_state = SR_CCB_OK;