Received: from eggs.gnu.org ([2001:4830:134:3::10]:52030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv4JK-0004bp-DD for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:22:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bv4JE-0005rj-Ra for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:22:13 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:36685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bv4JE-0005rX-Jk for qemu-devel@nongnu.org; Fri, 14 Oct 2016 11:22:08 -0400 Received: by mail-wm0-x242.google.com with SMTP id 79so268713wmy.3 for ; Fri, 14 Oct 2016 08:22:08 -0700 (PDT) Date: Fri, 14 Oct 2016 16:22:05 +0100 From: Stefan Hajnoczi Message-ID: <20161014152205.GC3482@stefanha-x1.localdomain> References: <1475842893-11763-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LwW0XdcUbUexiWVK" Content-Disposition: inline In-Reply-To: <1475842893-11763-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] replication: interrupt failover if the main device is closed List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, arei.gonglei@huawei.com, stefanha@redhat.com, zhang.zhanghailiang@huawei.com --LwW0XdcUbUexiWVK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 07, 2016 at 02:21:33PM +0200, Paolo Bonzini wrote: > Without this change, there is a race condition in tests/test-replication. > Depending on how fast the failover job (active commit) runs, there is a > chance of two bad things happening: >=20 > 1) replication_done can be called after the secondary has been closed > and hence when the BDRVReplicationState is not valid anymore. >=20 > 2) two copies of the active disk are present during the > /replication/secondary/stop test (that test runs immediately after > /replication/secondary/start, which tests failover). This causes the > corruption detector to fire. >=20 > Signed-off-by: Paolo Bonzini > --- > block/replication.c | 3 +++ > 1 file changed, 3 insertions(+) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan --LwW0XdcUbUexiWVK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJYAPgdAAoJEJykq7OBq3PIIpwH/2fWDYRtX+orxVcL4ovkQYjr ffvkmrMbTY70of0haE4HokwCX0uxv6HuWA1GkD125Pd+DonsaodoP4J+tHaYTVb5 CcU7XppUOS/Mf5GNekTUyMbPWhEyzHTW45apGR4JNt/q3OZIpG9d9mX9nC5YVOiG fAkhyiFao/SGldjM8pK1LEYVxLBZh8ajl3+0b56qyvHaxJ255z/ib4PFjoJXwRJV 5y36MQXgae8iWY0j7BBRsohn4J9Yryv9fy0ikI4VCmWM/sy6jfEWjlopFDGzpV5N pg1B3IZ6mgfBSRhok2Db39/fUMcmw4dl+wN5shx5ssBNZm0dXjy2HR2B6SbEV6s= =+7OO -----END PGP SIGNATURE----- --LwW0XdcUbUexiWVK--