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
This commit is contained in:
parent
ea84c62f93
commit
1f1088b843
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user