aboutsummaryrefslogtreecommitdiff
path: root/sys/geom
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2016-09-06 23:42:59 +0000
committerMark Johnston <markj@FreeBSD.org>2016-09-06 23:42:59 +0000
commit4bfb58535169a2020192913ab8e839300c442051 (patch)
treeec84d001283f7df062051137aaeaddb821b98e16 /sys/geom
parent40c5032d32033f34a5bd1bfe42cff9f1ef16e29b (diff)
downloadsrc-4bfb58535169a2020192913ab8e839300c442051.tar.gz
src-4bfb58535169a2020192913ab8e839300c442051.zip
Don't treat an error from g_mirror_clear_metadata() as fatal.
Such errors can occur as the result of a write error or because the disk backing the mirror element was removed. They result in a generation ID bump on all active elements of the mirror, so we can safely disconnect the mirror component rather than destroy it. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D7750
Notes
Notes: svn path=/head/; revision=305509
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/mirror/g_mirror.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c
index a8ad857e237d..75433d15b6d0 100644
--- a/sys/geom/mirror/g_mirror.c
+++ b/sys/geom/mirror/g_mirror.c
@@ -2678,8 +2678,12 @@ again:
int error;
error = g_mirror_clear_metadata(disk);
- if (error != 0)
- return (error);
+ if (error != 0) {
+ G_MIRROR_DEBUG(0,
+ "Device %s: failed to clear metadata on %s: %d.",
+ sc->sc_name, g_mirror_get_diskname(disk), error);
+ break;
+ }
DISK_STATE_CHANGED();
G_MIRROR_DEBUG(0, "Device %s: provider %s destroyed.",
sc->sc_name, g_mirror_get_diskname(disk));