Received: from eggs.gnu.org ([2001:4830:134:3::10]:35478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bO4wx-00052B-3W for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:22:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bO4wv-0003ql-Rg for qemu-devel@nongnu.org; Fri, 15 Jul 2016 11:22:46 -0400 References: <1468502894-18098-1-git-send-email-kwolf@redhat.com> <1468502894-18098-12-git-send-email-kwolf@redhat.com> <578805C8.2070904@redhat.com> <5788FEDC.9090501@redhat.com> From: Max Reitz Message-ID: Date: Fri, 15 Jul 2016 17:22:32 +0200 MIME-Version: 1.0 In-Reply-To: <5788FEDC.9090501@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3mDw3iUbC0XDthijdXRvuA93mS781Fbq5" Subject: Re: [Qemu-devel] [PATCH v4 11/11] nbd-server: Allow node name for nbd-server-add List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --3mDw3iUbC0XDthijdXRvuA93mS781Fbq5 From: Max Reitz To: Eric Blake , Kevin Wolf , qemu-block@nongnu.org Cc: berto@igalia.com, qemu-devel@nongnu.org Message-ID: Subject: Re: [PATCH v4 11/11] nbd-server: Allow node name for nbd-server-add References: <1468502894-18098-1-git-send-email-kwolf@redhat.com> <1468502894-18098-12-git-send-email-kwolf@redhat.com> <578805C8.2070904@redhat.com> <5788FEDC.9090501@redhat.com> In-Reply-To: <5788FEDC.9090501@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 15.07.2016 17:18, Eric Blake wrote: > On 07/15/2016 07:36 AM, Max Reitz wrote: >> On 14.07.2016 23:36, Eric Blake wrote: >>> On 07/14/2016 07:28 AM, Kevin Wolf wrote: >>>> There is no reason why an NBD server couldn't be started for any nod= e, >>>> even if it's not on the top level. This converts nbd-server-add to >>>> accept a node-name. >>>> >=20 >>> Do we want to do any sanity checking that writing should only be >>> permitted on a root, and that when using a node name that is not a ro= ot >>> that writable must be false so as not to negatively change the BDS ou= t >>> of under the feet of the other root? Do op-blockers already cover th= at? >> >> Well, one could argue that it's possible to create an NBD server on a >> non-root node today anyway, since creating BBs is not restricted to ro= ot >> nodes: >> >> blockdev-add(id=3Dfoo, other arguments...) >> blockdev-add(id=3Dbar, backing=3Dfoo, other arguments...) >> >> And then you can create an NBD server on bar. I agree that this is not= >> how it should be, though. However, I think that the fact that you need= >> to specify a BB name for now deters people from doing stuff like that.= >> If you can specify a node name, people will think it's completely fine= >> to do so. >=20 > Creating a server on bar doesn't change the contents of foo, so I see > that as safe (foo can still be in use by other chains, and the server o= n > bar won't invalidate those chains). Errr, I meant foo instead of bar. Curse me for using placeholder names. >> Also note that only allowing NBD servers to be created on a root node >> doesn't really help you: >> >> blockdev-add(node-name=3Dfoo, ...) >> nbd-server-add(device=3Dfoo) >> blockdev-add(id=3Dbar, backing=3Dfoo, ...) >=20 > But THAT is indeed unsafe, if the server allows writes, because now the= > contents of bar are at risk of being silently changed by any edits made= > to foo. >=20 > So the real restriction we want is that if foo is owned by a read-write= > BB (the NBD server in this case), then creating another BDS bar that > uses foo as a backing is undesirable. Well, it's exactly what the new op blockers should be for. >> So, yeah, I think we just need the new op-blockers for this, I don't >> think the current op blockers cover this. >=20 > I'm not sure either, which is why we're discussing it on list to make > sure we think about the restrictions and their implications. Considering that Kevin is on PTO as of today, I think the best course of action would be put the last two patches of this series off until after 2.7 is released. Max --3mDw3iUbC0XDthijdXRvuA93mS781Fbq5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEvBAEBCAAZBQJXiP+4EhxtcmVpdHpAcmVkaGF0LmNvbQAKCRA7sUIC6DisrQlZ B/wLAvKGkkvcN4otTXx4mtqb3vdZQgZLjgo6TJZSWn1vAOGXvHECfOKvhj+bdZXZ Mavz17WM+bDl0MrH8puX178XHrP0bxvCDde6UphwY74pxwAk74NrKrHc+oTofT3c 8UxVWoi7O2eUJh/xMlwwcUSrZx6XvctOwvRv5tloVhm1cDMl/9XO1yPTMt98YKuK f4LLz0ULDOOdOp80/mbb7fey6+vhq/GKVc1oUTbwFJGREvoHJ9PTOoTi/u4paO3l mr6xygsGTyrGnSI4aGMh5S791ROf32qLeVvKMGrj2Tmk0PjTnScd3BU1UyVprxdC 9DZ357HsxV6mBH1rUpfckKBy =LU1X -----END PGP SIGNATURE----- --3mDw3iUbC0XDthijdXRvuA93mS781Fbq5--