From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1ctY-0006CN-Jr for qemu-devel@nongnu.org; Wed, 25 Nov 2015 11:26:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1ctX-0000DA-JA for qemu-devel@nongnu.org; Wed, 25 Nov 2015 11:26:12 -0500 References: <1447108773-6836-1-git-send-email-mreitz@redhat.com> <1447108773-6836-13-git-send-email-mreitz@redhat.com> <20151125155706.GE12581@noname.str.redhat.com> <5655DBD3.2020203@redhat.com> <20151125161843.GH12581@noname.str.redhat.com> From: Max Reitz Message-ID: <5655E11A.4050506@redhat.com> Date: Wed, 25 Nov 2015 17:26:02 +0100 MIME-Version: 1.0 In-Reply-To: <20151125161843.GH12581@noname.str.redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xN440j8ePeTxvOBeTEdfBdMbvagmenow9" Subject: Re: [Qemu-devel] [PATCH v7 12/24] virtio-blk: Functions for op blocker management List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Alberto Garcia , qemu-block@nongnu.org, John Snow , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi , Paolo Bonzini This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xN440j8ePeTxvOBeTEdfBdMbvagmenow9 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 25.11.2015 17:18, Kevin Wolf wrote: > Am 25.11.2015 um 17:03 hat Max Reitz geschrieben: >> On 25.11.2015 16:57, Kevin Wolf wrote: >>> Am 09.11.2015 um 23:39 hat Max Reitz geschrieben: >>>> Put the code for setting up and removing op blockers into an own >>>> function, respectively. Then, we can invoke those functions whenever= a >>>> BDS is removed from an virtio-blk BB or inserted into it. >>>> >>>> Signed-off-by: Max Reitz >>> >>> Do you know of a case where this is observable? >> >> Actually, no. >> >>> I don't think you can= >>> change the medium of a virtio-blk device, and blk_set_bs() isn't >>> converted to a wrapper around blk_remove/insert_bs() yet. If this pat= ch >>> is necessary to fix something observable, the latter is probably a bu= g. >> >> So I guess that implies "Otherwise, this patch should be dropped"? >=20 > I'm not sure. I guess you had a reason to include these patches other > than putting the notifiers to use? I'm not sure, it has been so long. :-) I can very well imagine having included it because a similar change is necessary to virtio-scsi, so I included it just because I was already doing work for virtio. Maybe I imagined that virtio-blk may reasonably offer tray devices in the future, but I just now read you saying somewhere else: > Please write your code so that it makes sense today. So that doesn't hold up. :-) Maybe I just saw it unblocking the EJECT op blocker, and so I thought there might be a reason for that. > With blk_set_bs() changed, I think it would have an effect: The op > blockers would move from the old BDS to the new top-level one. This > sounds desirable to me. Hm, thanks for saving me. Yes, that seems useful indeed. [...] >>> This makes me wonder: What do we even block here any more? If I didn'= t >>> miss anything, it's only BLOCK_OP_TYPE_BACKUP_TARGET, and I'm not sur= e >>> why this needs to be blocked, or if we simply forgot to enable it. >> >> Well, even though in practice this wall of code doesn't make much sens= e, >> of course it will be safe for potential additions of new op blockers. >> >> And of course we actually don't want these blockers at all anymore... >=20 > Yes, but dataplane shouldn't really be special enough any more that we > want to disable features for it initially. By now it sounds more like a= n > easy way to forget unblocking a new feature even though it would work. >=20 > So perhaps we should really just remove the blockers from dataplane. > Then we don't have to answer the question above... Well, maybe. I guess this is up to Stefan. Max --xN440j8ePeTxvOBeTEdfBdMbvagmenow9 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 iQEcBAEBCAAGBQJWVeEaAAoJEDuxQgLoOKytyjYH/1Ll2UGCS5nyOuJVf4j24jab r9AlGlHhJoYN36Bbpd3vb4pz60i0s3xUHazNb3bFKacNqJ2P314YYqrCvaueGA3M nyZPOdXX8m//Mv80w7iULc283/wTT1zXOUnfvyYhhY/mKNr4wbiiJUE48jvvC332 GK3HXxSePV6/NnI9KbH5fbtkHKKFyfHLTa2yPhJMdwZmlWCTNFzeQ2itz++puyV/ C7zoNC8MIeI73cRtfvzqET60vtOOdSbN4rBarFX0/wHH+Lf9OlVpPMxvBBovs2tX M7vN8bjpNjaipsnabX+2Ka+SY8QKGwP6bqBn3ZNqr4vcfDMF7pyBRrOBEHNBY4w= =nAGE -----END PGP SIGNATURE----- --xN440j8ePeTxvOBeTEdfBdMbvagmenow9--