Received: from eggs.gnu.org ([2001:4830:134:3::10]:43839) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxYVd-0006C2-Kr for qemu-devel@nongnu.org; Thu, 19 Jun 2014 05:20:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WxYVU-00036K-JZ for qemu-devel@nongnu.org; Thu, 19 Jun 2014 05:19:53 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:49763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WxYVU-000368-Ca for qemu-devel@nongnu.org; Thu, 19 Jun 2014 05:19:44 -0400 Received: by mail-wi0-f180.google.com with SMTP id hi2so2475547wib.13 for ; Thu, 19 Jun 2014 02:19:43 -0700 (PDT) Date: Thu, 19 Jun 2014 17:19:35 +0800 From: Stefan Hajnoczi Message-ID: <20140619091935.GT21236@stefanha-thinkpad.redhat.com> References: <1402912857-10509-1-git-send-email-benoit.canet@irqsave.net> <1402912857-10509-4-git-send-email-benoit.canet@irqsave.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TJ9V72hR/LoebVea" Content-Disposition: inline In-Reply-To: <1402912857-10509-4-git-send-email-benoit.canet@irqsave.net> Subject: Re: [Qemu-devel] [PATCH v10 3/4] block: Add replaces argument to drive-mirror List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?iso-8859-1?Q?Beno=EEt?= Canet Cc: kwolf@redhat.com, mreitz@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, Benoit Canet --TJ9V72hR/LoebVea Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 16, 2014 at 12:00:56PM +0200, Beno=EEt Canet wrote: > +BlockDriverState *check_to_replace_node(const char *node_name, Error **e= rrp) > +{ > + BlockDriverState *to_replace_bs =3D bdrv_find_node(node_name); > + if (!to_replace_bs) { > + error_setg(errp, "Node name '%s' not found", > + node_name); > + return NULL; > + } > + > + if (bdrv_op_is_blocked(to_replace_bs, BLOCK_OP_TYPE_REPLACE, errp)) { > + return NULL; > + } Currently bdrv_op_is_blocked(to_replace_bs, BLOCK_OP_TYPE_REPLACE, errp) is not effective since child nodes never have op blockers. Only the root node/drive has op blockers. We discussed propagating blockers to child nodes. Can you send a patch to address this? I think Jeff will need to rebase his node-name series too. Stefan --TJ9V72hR/LoebVea Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJToqsnAAoJEJykq7OBq3PI2PEH/0Ocur44Wtm8ywaDOAvoIHLO cCFMCh/xawB/+8HqlrTYCWQnO6fiT+z9djspO0KKrAr8rZMVGVlSP8XNfbZeDvgu X4KyU3+I1FzW1RhQKLp/N54/DUWKnigeVKfFkazDwymrxrBM/oXhtD7vbXtifnbA y6jhBKUxS2BYrguBJuJThS6AQZnc6TjsPbT99OXYXA4R35NXsdn+wwA/dispgirP D7hjyym9RqKcaQGjkTSSx6fjrNJmXtn1dkpPHMGFo84lGMR5JDiBstng8/H85X4o SeMDdg7VuZNBalMoWqtMgLtm9ikWYtgbbgYUM8j9rklfG1JCpeja0GbN1jWvDI4= =4RjS -----END PGP SIGNATURE----- --TJ9V72hR/LoebVea--