From owner-svn-src-head@freebsd.org Thu Oct 26 17:18:25 2017 Return-Path: Delivered-To: svn-src-head@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 D5CCCE4EC1A; Thu, 26 Oct 2017 17:18:25 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4B8D52163; Thu, 26 Oct 2017 17:18:24 +0000 (UTC) (envelope-from ohartmann@walstatt.org) Received: from thor.intern.walstatt.dynvpn.de ([77.179.173.241]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MIdYi-1e9xeS2v4y-002GkP; Thu, 26 Oct 2017 19:18:16 +0200 Date: Thu, 26 Oct 2017 19:18:02 +0200 From: "O. Hartmann" To: Alan Somers Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r325011 - in head: cddl/usr.sbin/zfsd lib/libdevdctl Message-ID: <20171026191802.3d13f342@thor.intern.walstatt.dynvpn.de> In-Reply-To: <201710261528.v9QFSIDX017941@repo.freebsd.org> References: <201710261528.v9QFSIDX017941@repo.freebsd.org> Organization: WALSTATT User-Agent: OutScare 3.1415926 X-Operating-System: ImNotAnOperatingSystem 3.141592527 MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/fmn.CyBi2jMOTbw.9pdX8y2"; protocol="application/pgp-signature" X-Provags-ID: V03:K0:pCRAMfbwTLAlLMqHK5ysMkoMzDUhlVvAc2ezJINGb+I2nLAjreG 3w328Ho7RxYmoNjL/wzTwVFjKzkoWINOQzGXhDegUePlScAL9BXBamKZ+2q/bbiV+E8gUix qoXBCi3vrLvJQFMnpmP8AwYjuBVj+9InmeJQgy3uonnIO3sVFlUEgvWUBUXS5+S3LpjEboF xEH4XoX+5LDnaqBUTFmzg== X-UI-Out-Filterresults: notjunk:1;V01:K0:HrecSDeuQsc=:QcfitdV88i+5BJ3qSIekqR I1/eK3mATCSRlxoA193xZaD0odOMW4pk27EOH+kf03wzTMyHQeYw2pM2xfGUII3wl7NF6msjE Hz1iyilR8VUgboO5ThF6yu2wCiSv6qc2uxl1aHp9k0NeXMki497f1dnYGjKJHwnjlOq1EzVol yIm72QjRdQ87YEc9fmxzpCtBMYzI7ObWjcH174x2nyiGqEg7ga37k5IMz2BX0s+eicRhKFfpr SJdi5vWGKpVT4mPvlwd/ZrstREN0yCcHsvhnc+rB6rxWbtFDHwWP/sdO5J95SOOcDM52BhTyY 3N6cdtkilFppoiyiSi8brQbnBYoEm2hX7Kqm+fP00SxnDNWfAWcVNVF0atSCOtTUv0I/ynfUG 4OGYN78ikqJdu35fDBZtJuSaM8EGbv3mkUNaCnHX0vfhMq7Eb2kww+drDpFx7WTOMKun6YfiS TURj9aW9EKFD4N8Eho1kOhdnH7DGVp7u/IjdzXU9f9x3RGlQnZF0/+LP2u0DVnHygODQctzIk L0BKc5iKx8U4r3S+ai6kEnbZQ4F0AErEA3U0628QjqYdBIjwD7hv4nNbfquAp8rUBgVfT/Kqh 0lFGwmEOUWQ5rFG1Xvz1Z222i9ROkXjbEe8Vvz+xavoNM415yJ3BL3se29ph5ZPKt0cBCA0He yZP7fL1Aj70Fb8GsWAkiRrh2at1PxGDUtbXvwF+5qgf1YgBasXqUZ2QsSz+pCxiE6F2m1q3+m CyXl1lXayeJobydRL6FenhOvaZqdCNnk8lnuHGe48EcEaXEmWuMyvGtvaUzhuy2TvudRd7kzR CbqMGsrK91HnKn4GcT43BiR7vC3cQ== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Oct 2017 17:18:26 -0000 --Sig_/fmn.CyBi2jMOTbw.9pdX8y2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Am Thu, 26 Oct 2017 15:28:18 +0000 (UTC) Alan Somers schrieb: > Author: asomers > Date: Thu Oct 26 15:28:18 2017 > New Revision: 325011 > URL: https://svnweb.freebsd.org/changeset/base/325011 >=20 > Log: > zfsd should be able to online an L2ARC that disappears and returns > =20 > Previously, this didn't work because L2ARC devices' labels don't contain > pool GUIDs. Modify zfsd so that the pool GUID won't be required: > =20 > lib/libdevdctl/guid.h > Change INVALID_GUID from a uint64_t constant to a function that > returns an invalid Guid object. Remove the void constructor. > Nothing uses it, and it violates RAII. > =20 > cddl/usr.sbin/zfsd/case_file.h > cddl/usr.sbin/zfsd/case_file.cc > Allow CaseFile::Find to match a CaseFile based on Vdev GUID alone. > In CaseFile::ReEvaluate, attempt to online devices even if the newly > arrived device has no pool GUID. > =20 > cddl/usr.sbin/zfsd/vdev_iterator.cc > Iterate through a pool's cache devices as well as its regular > devices. > =20 > Reported by: avg > Reviewed by: avg > MFC after: 3 weeks > Sponsored by: Spectra Logic Corp > Differential Revision: https://reviews.freebsd.org/D12791 >=20 > Modified: > head/cddl/usr.sbin/zfsd/case_file.cc > head/cddl/usr.sbin/zfsd/case_file.h > head/cddl/usr.sbin/zfsd/vdev_iterator.cc > head/lib/libdevdctl/guid.h >=20 > Modified: head/cddl/usr.sbin/zfsd/case_file.cc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/usr.sbin/zfsd/case_file.cc Thu Oct 26 13:23:13 2017 > (r325010) +++ head/cddl/usr.sbin/zfsd/case_file.cc Thu Oct 26 15:28:18 > 2017 (r325011) @@ -102,7 +102,8 @@ CaseFile::Find(Guid poolGUID, Guid vde= vGUID) > for (CaseFileList::iterator curCase =3D s_activeCases.begin(); > curCase !=3D s_activeCases.end(); curCase++) { > =20 > - if ((*curCase)->PoolGUID() !=3D poolGUID > + if (((*curCase)->PoolGUID() !=3D poolGUID > + && Guid::InvalidGuid() !=3D poolGUID) > || (*curCase)->VdevGUID() !=3D vdevGUID) > continue; > =20 > @@ -268,7 +269,8 @@ CaseFile::ReEvaluate(const string &devPath, const stri > } > =20 > if (vdev !=3D NULL > - && vdev->PoolGUID() =3D=3D m_poolGUID > + && ( vdev->PoolGUID() =3D=3D m_poolGUID > + || vdev->PoolGUID() =3D=3D Guid::InvalidGuid()) > && vdev->GUID() =3D=3D m_vdevGUID) { > =20 > zpool_vdev_online(pool, vdev->GUIDString().c_str(), >=20 > Modified: head/cddl/usr.sbin/zfsd/case_file.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/usr.sbin/zfsd/case_file.h Thu Oct 26 13:23:13 2017 (r325010) > +++ head/cddl/usr.sbin/zfsd/case_file.h Thu Oct 26 15:28:18 2017 (r325011) > @@ -89,6 +89,8 @@ class CaseFile (public) > * \brief Find a CaseFile object by a vdev's pool/vdev GUID tuple. > * > * \param poolGUID Pool GUID for the vdev of the CaseFile to find. > + * If InvalidGuid, then only match the vdev GUID > + * instead of both pool and vdev GUIDs. > * \param vdevGUID Vdev GUID for the vdev of the CaseFile to find. > * > * \return If found, a pointer to a valid CaseFile object. >=20 > Modified: head/cddl/usr.sbin/zfsd/vdev_iterator.cc > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/cddl/usr.sbin/zfsd/vdev_iterator.cc Thu Oct 26 13:23:13 2017 > (r325010) +++ head/cddl/usr.sbin/zfsd/vdev_iterator.cc Thu Oct 26 15:28:18 > 2017 (r325011) @@ -76,7 +76,9 @@ void > VdevIterator::Reset() > { > nvlist_t *rootVdev; > + nvlist **cache_child; > int result; > + uint_t cache_children; > =20 > result =3D nvlist_lookup_nvlist(m_poolConfig, > ZPOOL_CONFIG_VDEV_TREE, > @@ -85,6 +87,13 @@ VdevIterator::Reset() > throw ZfsdException(m_poolConfig, "Unable to extract " > "ZPOOL_CONFIG_VDEV_TREE from pool."); > m_vdevQueue.assign(1, rootVdev); > + result =3D nvlist_lookup_nvlist_array(rootVdev, > + ZPOOL_CONFIG_L2CACHE, > + &cache_child, > + &cache_children); > + if (result =3D=3D 0) > + for (uint_t c =3D 0; c < cache_children; c++) > + m_vdevQueue.push_back(cache_child[c]); > } > =20 > nvlist_t * >=20 > Modified: head/lib/libdevdctl/guid.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/lib/libdevdctl/guid.h Thu Oct 26 13:23:13 2017 (r325010) > +++ head/lib/libdevdctl/guid.h Thu Oct 26 15:28:18 2017 (r325011) > @@ -62,9 +62,9 @@ class Guid > { > public: > /* Constructors */ > - Guid(); > Guid(uint64_t guid); > Guid(const std::string &guid); > + static Guid InvalidGuid(); > =20 > /* Assignment */ > Guid& operator=3D(const Guid& rhs); > @@ -80,23 +80,24 @@ class Guid > operator uint64_t() const; > operator bool() const; > =20 > - static const uint64_t INVALID_GUID =3D 0; > protected: > + static const uint64_t INVALID_GUID =3D 0; > + > /* The integer value of the GUID. */ > uint64_t m_GUID; > }; > =20 > //- Guid Inline Public Methods -----------------------------------------= ------- > inline > -Guid::Guid() > - : m_GUID(INVALID_GUID) > +Guid::Guid(uint64_t guid) > + : m_GUID(guid) > { > } > =20 > -inline > -Guid::Guid(uint64_t guid) > - : m_GUID(guid) > +inline Guid > +Guid::InvalidGuid() > { > + return (Guid(INVALID_GUID)); > } > =20 > inline Guid& > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" Building world and kernel on revision 325014 fails with=20 [...] =3D=3D=3D> gnu/usr.bin/binutils/ld (all) --- all_subdir_lib --- --- lrint_test --- (cd /usr/src/lib/msun/tests && DEPENDFILE=3D.depend.lrint_test NO_SUBDIR= =3D1 make -f /usr/src/lib/msun/tests/Makefile _RECURSING_PROGS=3Dt PROG=3Dlrint_test= ) --- all_subdir_cddl --- --- all_subdir_cddl/usr.sbin/zfsd --- --- vdev.o --- /usr/src/cddl/usr.sbin/zfsd/vdev.cc:81:7: error: constructor for 'Vdev' mus= t explicitly initialize the member 'm_poolGUID' which does not have a default constructo= r Vdev::Vdev() and this pacth seems to be the culprit. Kind regards, Oliver --=20 O. Hartmann Ich widerspreche der Nutzung oder =C3=9Cbermittlung meiner Daten f=C3=BCr Werbezwecke oder f=C3=BCr die Markt- oder Meinungsforschung (=C2=A7 28 Abs.= 4 BDSG). --Sig_/fmn.CyBi2jMOTbw.9pdX8y2 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWfIYygAKCRDS528fyFhY lEsxAf9B4z69n/pPobqUgNynscdBeD+4fI7dtL33Yat9Wh9Vpy0FGDp7Oitaho3Z RYplJRJ9xrW06mCpJ+KcpW1WnM96Af93uHdC8qVVaetnk8mCn2oROEj7T2lCgkSS WKvygjgozvSBSrBv9PSEuCvt4JJrulzlI1VD1mpPT/UAtjOyHaUW =uS/l -----END PGP SIGNATURE----- --Sig_/fmn.CyBi2jMOTbw.9pdX8y2--