From owner-freebsd-geom@FreeBSD.ORG Sat Jan 26 10:51:45 2013 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1CF9B8F6; Sat, 26 Jan 2013 10:51:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 262699FA; Sat, 26 Jan 2013 10:51:43 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA10806; Sat, 26 Jan 2013 12:51:36 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Tz3MG-000HlL-2C; Sat, 26 Jan 2013 12:51:36 +0200 Message-ID: <5103B537.3040606@FreeBSD.org> Date: Sat, 26 Jan 2013 12:51:35 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130121 Thunderbird/17.0.2 MIME-Version: 1.0 To: Alexander Motin Subject: Re: kern/175323: Fail to use ZVOL as a gmirror component References: <50FD0E99.8010305@FreeBSD.org> <50FEBE55.1040009@FreeBSD.org> <50FED0D5.6060105@FreeBSD.org> In-Reply-To: <50FED0D5.6060105@FreeBSD.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Alexei.Volkov@softlynx.ru, freebsd-geom@FreeBSD.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Jan 2013 10:51:45 -0000 on 22/01/2013 19:48 Alexander Motin said the following: > That looks fine to me. I would just do it as: Committed. Thanks to everyone! > --- g_mirror.c (revision 245794) > +++ g_mirror.c (working copy) > @@ -457,9 +457,7 @@ g_mirror_init_disk(struct g_mirror_softc *sc, stru > 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; > > -- Andriy Gapon