From owner-svn-src-all@freebsd.org Tue Feb 19 23:44:15 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9B9FB14DE294 for ; Tue, 19 Feb 2019 23:44:15 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0EE9B823FE for ; Tue, 19 Feb 2019 23:44:15 +0000 (UTC) (envelope-from shawn.webb@hardenedbsd.org) Received: by mail-ed1-x543.google.com with SMTP id x7so18305447eds.8 for ; Tue, 19 Feb 2019 15:44:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hardenedbsd.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=rRdePG8ulxpGCBjn+lw9ZxrSQ5OcB+N6eVtttSTlUjI=; b=Z+2wGS+5+0Nxxn2E+AVg2kfAJ3RrEw9ujamdDfEz5bxgucbf4QDbmZb5jrJO1DDBgj 93yInAEcFuHM08M4J0XxgpnTg8VLjEoQfR2Djb9eCRBRvZ4f1Q9DnEdmuHExyOHc/aSe mPxysahD5lyReP5032szYR3viOnOVE3LxWawcK/VN8YO39jEFC5KEG1QUcNzq/ZR8Ag/ pG7yykaI/Z3Hx9cEkrqXxO0eiwDQJXjmvhaaaTIMEfRNLu8el98qPtX16l+r/FPujgcX aSq4g95IT2EP8V2OqRdmZ1n23PES3HOeMPDIYi+4uWs5GnaWk8KarRVKdZVJRJaxYEMg vcDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=rRdePG8ulxpGCBjn+lw9ZxrSQ5OcB+N6eVtttSTlUjI=; b=kzw6XTNZb+5RsONd/2SksFVWmM9wrlLdAg1HahYiJoQJ8nJDJXfDFK4R/bxgkcq2pH kjPKIutxZ2f1nbv3ffFOrfaoDTML5IM0NZLH5w0HckefQXWJwf4QFIWawCsP3FSxY53u Nsj21cypc2co3zlwOvWzPFV4t0iREOHJn/2PaMXPwpZl8pUMp9yQyH+VLQyJUvBbI8YI ejzYEDunHP++9V/RtkJ9BTpwFYSIL45qoBHvC4rdC6Grr4DtMv7+NC4rbaZHH3CigOaM 0kAWG8koQj5NI53ioqhoE1v+a6lQM5a7wE8mPQO6MehtcXq0ONGfg719qJ/5n+8/ZJDn 2JjA== X-Gm-Message-State: AHQUAuaxGoHrZZkhvDecbR9Y1TUQLMe3HIgIRp47ZiIJ7HLhMn5a8kHs yC4WeJhedJH8KXtJifVqk3LMOQ== X-Google-Smtp-Source: AHgI3IZM9U4pcRAmxypnGp7dyYCZOWbar5ctJziPF6VH7G3KVaGCM6th0myrMkoAD0uVco0JZul8mA== X-Received: by 2002:a50:92d0:: with SMTP id l16mr25242386eda.153.1550619853021; Tue, 19 Feb 2019 15:44:13 -0800 (PST) Received: from mutt-hbsd ([185.165.169.165]) by smtp.gmail.com with ESMTPSA id o13sm4920289edq.57.2019.02.19.15.44.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 19 Feb 2019 15:44:12 -0800 (PST) Date: Tue, 19 Feb 2019 18:43:28 -0500 From: Shawn Webb To: Pawel Jakub Dawidek Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r344316 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <20190219234328.wrmteippr6vbg2fr@mutt-hbsd> References: <201902192335.x1JNZu53080578@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="hnirbtvcopw34t5o" Content-Disposition: inline In-Reply-To: <201902192335.x1JNZu53080578@repo.freebsd.org> X-Operating-System: FreeBSD mutt-hbsd 13.0-CURRENT-HBSD FreeBSD 13.0-CURRENT-HBSD e44da5b3ebd(hardened/current/master) HARDENEDBSD-13-CURRENT amd64 X-PGP-Key: http://pgp.mit.edu/pks/lookup?op=vindex&search=0x6A84658F52456EEE User-Agent: NeoMutt/20180716 X-Rspamd-Queue-Id: 0EE9B823FE X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.97 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.97)[-0.971,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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, 19 Feb 2019 23:44:15 -0000 --hnirbtvcopw34t5o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 19, 2019 at 11:35:56PM +0000, Pawel Jakub Dawidek wrote: > Author: pjd > Date: Tue Feb 19 23:35:55 2019 > New Revision: 344316 > URL: https://svnweb.freebsd.org/changeset/base/344316 >=20 > Log: > The way ZFS searches for its vdevs is the following: first it looks for > a vdev that has the same name as the one stored in metadata and that has > all VDEV labels in place. If it cannot find a GEOM provider with the gi= ven > name and all VDEV labels it will scan all GEOM providers for the best m= atch > (the most VDEV labels available), but here the name is ignored. > =20 > In case the ZFS pool is created, eg. using GPT partition label: > =20 > # zpool create tank /dev/gpt/tank > =20 > everything works, and on every import ZFS will pick /dev/gpt/tank and > not /dev/da0p4. > =20 > The problem occurs when da0p4 is extended and ZFS is unable to find all > VDEV labels in /dev/gpt/tank anymore (the VDEV labels stored at the end > of the partition are now somewhere else). In this case it will scan all > GEOM providers and will pick the first one with the best match, ie. da0= p4. > =20 > Fix this problem by checking the VDEV/provider name even if we get the = same > match. If the name is the same as the one we have in pool's metadata, p= refer > this GEOM provider. > =20 > Reported by: oshogbo, Michal Mroz > Tested by: Michal Mroz > Obtained from: Fudo Security >=20 > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c At the risk of painting a bikeshed a lovely color of neon purple, I'm curious about if/how these types of commits get merged upstream to (OpenZFS|Illumos|ZFS On Linux|where ever ZFS upstream is now|I'm very confused|is anyone else confused where upstream is?). Who is upstream? Is work like this going to remain as a downstream patch to ZFS? Or is FreeBSD going to work to upstream this type of work? I hope my curiousity doesn't offend anyone. ;) Thanks, --=20 Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal: +1 443-546-8752 Tor+XMPP+OTR: lattera@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --hnirbtvcopw34t5o Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAlxslJwACgkQaoRlj1JF bu5s9A//alw1McK6fXYjINgJ6OhifqC+AxXBvmjNSUAETHX8RTGt+zUfG5eAan81 UX/T7tXSR2nn1yDy5tUxCpNiKajTG1KDIkw3gr5JLMOxyVCdCUoqrwKcVR2hk2yK Cg9+6MVUfDPeRb1c2qCxdRFExUWRG7eApLuCYuTCqsJgrGvURtrmV8hpPXALuli7 +7vsqIvXCIiiemwbl8gC5F96zVBefn8tJEJ1HTmPTajNR9BvmY+4I7W3q/JMlN8N hBvRgy1agyt6Krf2uGqE3O6zXvHL6XebGYESFdR34/hvRQ+T54IKQ3fXxa+XXQjp r3VNVx7G5ky+z5Cly0isYwdF8nqFGlEPNEVqYtckXG9qbYUPnNgU2AyBR0rlM3Xc KHwbKo48Bb9a9l7nDE6qmzW83ENd2V/GK2u7zxFIHWBth9plC6NLTu15aU6np/4L 1szowoMI05xHjIsVFQkwdUd89Oe1ijoNFWd2NM66b9nLQWF5GPMQM0NP5x/wbK2N 8h0zLXJXacDm9XhZPMgHKfRFVyCdx24jF45EmV00DFbM2lrAkwRXGZRGxbvajq9p tJ21POlVmFx2bWN8uRRZ/04LnqzLu0mExGocPZ0EMvK3WngT3vDxLmSee6ZPVC/O wTJ60T90VpEqPuKRO+tQSvoPF2FkiVKf/EQZU7zj1M1wzzxgPLk= =igqV -----END PGP SIGNATURE----- --hnirbtvcopw34t5o--