diff options
author | 2017-09-06 21:08:01 +0000 | |
---|---|---|
committer | 2017-09-06 21:08:01 +0000 | |
commit | 36e4631057c48eed1621467306799bf96e7ce172 (patch) | |
tree | f3fb51de6a902ed0640357a7a26f90255810896b /sys/dev/softraid.c | |
parent | After recent changes, we need to clear hash, not s1. (diff) | |
download | wireguard-openbsd-36e4631057c48eed1621467306799bf96e7ce172.tar.xz wireguard-openbsd-36e4631057c48eed1621467306799bf96e7ce172.zip |
In the case that we want to force a new RAID assembly and the metadata
type on the chunks is not the same, we don't actually care because we
are going to clear their metadata anyway, so don't error out. This
allows assembling a new RAID based on a drive that is zeroed and one
that used to be part of a softraid in its previous life.
ok jsing@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 8b75f238072..dcc4db16864 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.384 2017/08/30 12:43:18 patrick Exp $ */ +/* $OpenBSD: softraid.c,v 1.385 2017/09/06 21:08:01 patrick Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -1658,7 +1658,7 @@ sr_meta_native_attach(struct sr_discipline *sd, int force) not_sr++; } - if (sr && not_sr) { + if (sr && not_sr && !force) { sr_error(sc, "not all chunks are of the native metadata " "format"); goto bad; |