From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvtSR-0006Mz-0V for qemu-devel@nongnu.org; Fri, 22 May 2015 16:22:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvtSP-0004XZ-Uw for qemu-devel@nongnu.org; Fri, 22 May 2015 16:22:14 -0400 Message-ID: <555F8FEC.6010105@redhat.com> Date: Fri, 22 May 2015 14:22:04 -0600 From: Eric Blake MIME-Version: 1.0 References: <1432266060-22104-1-git-send-email-famz@redhat.com> <1432266060-22104-5-git-send-email-famz@redhat.com> In-Reply-To: <1432266060-22104-5-git-send-email-famz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="aHcWo44qTpOtaauQFrNrQajvSo2DR4sA7" Subject: Re: [Qemu-devel] [PATCH v4 4/8] block: Fix dirty bitmap in bdrv_co_discard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng , qemu-devel@nongnu.org Cc: Kevin Wolf , qemu-block@nongnu.org, Jeff Cody , qemu-stable@nongnu.org, Stefan Hajnoczi , pbonzini@redhat.com, jsnow@redhat.com, wangxiaolong@ucloud.cn This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --aHcWo44qTpOtaauQFrNrQajvSo2DR4sA7 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/21/2015 09:40 PM, Fam Zheng wrote: > Unsetting dirty globally with discard is not very correct. The discard = may zero > out sectors (depending on can_write_zeroes_with_unmap), we should repli= cate > this change to destinition side to make sure that the guest sees the sa= me data. s/destinition/destination/ >=20 > Calling bdrv_reset_dirty also troubles mirror job because the hbitmap i= terator > doesn't expect unsetting of bits after current position. >=20 > So let's do it the opposite way which fixes both problems: set the dirt= y bits > if we are to discard it. >=20 > Reported-by: wangxiaolong@ucloud.cn > Signed-off-by: Fam Zheng > Reviewed-by: Paolo Bonzini > --- > block/io.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --aHcWo44qTpOtaauQFrNrQajvSo2DR4sA7 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 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVX4/sAAoJEKeha0olJ0Nqkj4IAKSO9YATaUB3syg4elrsnT43 04Z/F9WWphnJd6xrRYkS47yyeBR/SmoD/ySI0M0rXqrWQ9r0eA+AcsPIKfV1iWnD 9wrafl1wwBcXoeRsVkJI65Y2abkdMbLkQvAk7GUnDMnVgMTpt/MLRhZxXDg/oDcW I64ves3lOGpmIyGRzfXU4sht8hqzj+3FND6DFGTz3HzOVOSgSB9xjA2ZV+QCLCRt EmjLU+IrA0WUdl0Vm4TohL1Enp2nck2n5mietWLFrvrQskHH8KpCjrEWaCaUikKL rhMB2rTDjDIZ9BBbAjSQTaZiaHlL26S8Xy/D9RDpG9nT45oAHs2ZYaj/SPkbIcE= =bOra -----END PGP SIGNATURE----- --aHcWo44qTpOtaauQFrNrQajvSo2DR4sA7--