diff options
author | avg <avg@FreeBSD.org> | 2013-01-26 10:50:04 +0000 |
---|---|---|
committer | avg <avg@FreeBSD.org> | 2013-01-26 10:50:04 +0000 |
commit | c245f91f95f1baf840561332ef6518db6bb48df6 (patch) | |
tree | fccee71d308147332d0fb4196460e8e33675c797 /sys/geom/mirror | |
parent | 3986bee147cae9ee9ce2d9a28c28b1370ac19ec6 (diff) | |
download | FreeBSD-src-c245f91f95f1baf840561332ef6518db6bb48df6.zip FreeBSD-src-c245f91f95f1baf840561332ef6518db6bb48df6.tar.gz |
g_mirror: g_getattr() failure should not be fatal
This allows to use gmirror e.g. on top of ZVOLs.
PR: kern/175323
Submitted by: Alexei.Volkov@softlynx.ru, mav
Reported by: Alexei.Volkov@softlynx.ru
Tested by: Alexei.Volkov@softlynx.ru
Reviewed by: ae, mav, pjd
MFC after: 1 week
Diffstat (limited to 'sys/geom/mirror')
-rw-r--r-- | sys/geom/mirror/g_mirror.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index d77dee9..0a8aeb0 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -457,9 +457,7 @@ g_mirror_init_disk(struct g_mirror_softc *sc, struct g_provider *pp, disk->d_priority = md->md_priority; disk->d_flags = md->md_dflags; error = g_getattr("GEOM::candelete", disk->d_consumer, &i); - if (error != 0) - goto fail; - if (i) + if (error == 0 && i != 0) disk->d_flags |= G_MIRROR_DISK_FLAG_CANDELETE; if (md->md_provider[0] != '\0') disk->d_flags |= G_MIRROR_DISK_FLAG_HARDCODED; |