diff options
author | grog <grog@FreeBSD.org> | 1999-05-02 07:50:09 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-05-02 07:50:09 +0000 |
commit | 00c882d0273ab22fc128b2c4abe2af9752f37797 (patch) | |
tree | 37b919002eb85b0b8f76fc359bb5b75bd9273353 | |
parent | a2704f47c7801ed2ac34fdf97c4a28434c55f63e (diff) | |
download | FreeBSD-src-00c882d0273ab22fc128b2c4abe2af9752f37797.zip FreeBSD-src-00c882d0273ab22fc128b2c4abe2af9752f37797.tar.gz |
set_sd_state:
Don't change state from reborn to reborn. This caused a silly
warning message.
-rw-r--r-- | sys/dev/vinum/vinumstate.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/dev/vinum/vinumstate.c b/sys/dev/vinum/vinumstate.c index 281220e..074b552 100644 --- a/sys/dev/vinum/vinumstate.c +++ b/sys/dev/vinum/vinumstate.c @@ -128,6 +128,7 @@ set_sd_state(int sdno, enum sdstate newstate, enum setstateflags flags) return 0; /* not even by force */ switch (sd->state) { case sd_crashed: + case sd_reborn: case sd_down: /* been down, no data lost */ /* * If we're associated with a plex, and @@ -145,12 +146,14 @@ set_sd_state(int sdno, enum sdstate newstate, enum setstateflags flags) * * Do we even want this any more? */ - sd->state = sd_reborn; /* here it is again */ - log(LOG_INFO, - "vinum: subdisk %s is %s, not %s\n", - sd->name, - sd_state(sd->state), - sd_state(newstate)); + if (oldstate != sd_reborn) { + sd->state = sd_reborn; /* here it is again */ + log(LOG_INFO, + "vinum: subdisk %s is %s, not %s\n", + sd->name, + sd_state(sd->state), + sd_state(newstate)); + } status = -1; break; |