summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2011-12-25 15:16:22 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2011-12-25 15:16:22 +0000
commit3db23b0e1d09208e37bae5a5b985ffb56823c771 (patch)
treecc312e5885b01ddf3725e82ef024d2378b462980 /sys/dev
parent6f37c9fd46476f01f2f7d97260a119f9c7504b39 (diff)
Move chunk state debugging code to a more useful location.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid_raid1.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/softraid_raid1.c b/sys/dev/softraid_raid1.c
index 0979492e3eb..f7a2eef8b7b 100644
--- a/sys/dev/softraid_raid1.c
+++ b/sys/dev/softraid_raid1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_raid1.c,v 1.27 2011/04/05 19:52:02 krw Exp $ */
+/* $OpenBSD: softraid_raid1.c,v 1.28 2011/12/25 15:16:21 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
*
@@ -247,6 +247,13 @@ sr_raid1_set_vol_state(struct sr_discipline *sd)
nd = sd->sd_meta->ssdi.ssd_chunk_no;
+#ifdef SR_DEBUG
+ for (i = 0; i < nd; i++)
+ DNPRINTF(SR_D_STATE, "%s: chunk %d status = %u\n",
+ DEVNAME(sd->sd_sc), i,
+ sd->sd_vol.sv_chunks[i]->src_meta.scm_status);
+#endif
+
for (i = 0; i < SR_MAX_STATES; i++)
states[i] = 0;
@@ -271,14 +278,8 @@ sr_raid1_set_vol_state(struct sr_discipline *sd)
else if (states[BIOC_SDOFFLINE] != 0)
new_state = BIOC_SVDEGRADED;
else {
-#ifdef SR_DEBUG
DNPRINTF(SR_D_STATE, "%s: invalid volume state, old state "
"was %d\n", DEVNAME(sd->sd_sc), old_state);
- for (i = 0; i < nd; i++)
- DNPRINTF(SR_D_STATE, "%s: chunk %d status = %d\n",
- DEVNAME(sd->sd_sc), i,
- sd->sd_vol.sv_chunks[i]->src_meta.scm_status);
-#endif
panic("invalid volume state");
}