Date: Mon, 05 Sep 2016 19:55:43 -0700 From: Cy Schubert <Cy.Schubert@komquats.com> To: Andriy Gapon <avg@FreeBSD.org> Cc: Alexander Motin <mav@FreeBSD.org>, 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 Message-ID: <201609060255.u862thYG042696@slippy.cwsent.com> In-Reply-To: Message from Andriy Gapon <avg@FreeBSD.org> of "Tue, 06 Sep 2016 00:17:19 %2B0300." <c6db6a18-9a59-4cfd-ca4f-2505b7ab33aa@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <c6db6a18-9a59-4cfd-ca4f-2505b7ab33aa@FreeBSD.org>, 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 <Cy.Schubert@cschubert.com> FreeBSD UNIX: <cy@FreeBSD.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201609060255.u862thYG042696>