diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2007-04-17 23:18:24 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2007-04-17 23:18:24 +0000 |
commit | ac43e65badd60311dfb58d03d6f4d7d441fad7bf (patch) | |
tree | a806bdd52146ba4551288830ae5a5ff5ab3b3051 | |
parent | 255bb8fd12ba62b1241d104f810cd06c9e64b2ed (diff) |
Whenever there are mutliple outstanding IOs a chunk can transtion multiple
times to the same state. Ignore that.
Tested by thib@
-rw-r--r-- | sys/dev/softraid.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 0804e634f89..da4da68085c 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.21 2007/04/17 05:59:20 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.22 2007/04/17 23:18:23 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * @@ -1535,6 +1535,10 @@ sr_raid1_set_chunk_state(struct sr_discipline *sd, int c, int new_state) s = splbio(); old_state = sd->sd_vol.sv_chunks[c]->src_meta.scm_status; + /* multiple IOs to the same chunk that fail will come through here */ + if (old_state == new_state) + goto done; + switch (old_state) { case BIOC_SDONLINE: switch (new_state) { @@ -1589,6 +1593,7 @@ die: sd->sd_vol.sv_chunks[c]->src_meta.scm_status = new_state; sd->sd_set_vol_state(sd); +done: splx(s); } |