From owner-svn-src-all@freebsd.org Tue Sep 6 02:58:23 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E856CBA500D; Tue, 6 Sep 2016 02:58:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 96D37756; Tue, 6 Sep 2016 02:58:23 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id h6Y4bz5o0OQkFh6Y5bHmAZ; Mon, 05 Sep 2016 20:55:45 -0600 X-Authority-Analysis: v=2.2 cv=VYS1Bxh9 c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=GW1xBdLrtEIA:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=uooYTw9ockgChiKqBy8A:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id ECF9D7FA; Mon, 5 Sep 2016 19:55:43 -0700 (PDT) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u862thYG042696; Mon, 5 Sep 2016 19:55:43 -0700 (PDT) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <201609060255.u862thYG042696@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Andriy Gapon cc: Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r305331 - in head/sys/cddl/contrib/opensolaris/uts/common: fs/zfs fs/zfs/sys sys/fs In-Reply-To: Message from Andriy Gapon of "Tue, 06 Sep 2016 00:17:19 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 05 Sep 2016 19:55:43 -0700 X-CMAE-Envelope: MS4wfAcVBBoK7uWsp3BKGQU2ImuMrntjr4hnQkpZoFGg21sW37ZVYmUdXlkLOBkCv8mq3gYcF4zs4EQO1qpzNuos0YQdCVu/SkRi2VBsVvS5wBaTHY9r+7MX ookYFNx7fjG/WP06a0psEQ98r50NkK1GvERne7acI4a6DOxfhABk9qjwKKaWBwA+t5OlkbmSN14MzX714g1aIp/bIxfcPRJ12AWajMk0bvypgabX+N4v4BtO Kqx/4asmYS9zg7+L1OKzsSk7rI/xueOkbx9LbGTXerXGNKR3BID/eT11nNL/hY60JfteeaJTAOeIux7A//F+0A== X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Sep 2016 02:58:24 -0000 In message , Andriy Gapon wri tes: > On 05/09/2016 23:47, Andriy Gapon wrote: > > Alexander, > > > > I belive that this commit accidentally breaks the following scenario: > > zpool create tank /dev/xxx > > zpool destroy tank > > zpool create tank /dev/xxx > > > > It seems that vdev_geom code is unaware of SPA_LOAD_CREATE state and it wou > ld > > try to match a device GUID, if it can be read, in addition to a name. > > And a rather trivial (and maybe not quite correct) fix: > > diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > index 077983ca847c8..818052ba577ec 100644 > --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > @@ -777,7 +777,8 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max > _psize, > > if (vd->vdev_spa->spa_splitting_newspa || > (vd->vdev_prevstate == VDEV_STATE_UNKNOWN && > - vd->vdev_spa->spa_load_state == SPA_LOAD_NONE)) { > + vd->vdev_spa->spa_load_state == SPA_LOAD_NONE || > + vd->vdev_spa->spa_load_state == SPA_LOAD_CREATE)) { > /* > * We are dealing with a vdev that hasn't been previously > * opened (since boot), and we are not loading an > > This patch fixes mine as well: bob# zpool create foobar /dev/da1p1 cannot create 'foobar': no such pool or dataset bob# The at the time to-be-created pool's partiton was previously inhabited by NTFS. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.