From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNj8g-0007Be-Ig for qemu-devel@nongnu.org; Thu, 14 Jul 2016 12:05:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNj8f-0004sk-El for qemu-devel@nongnu.org; Thu, 14 Jul 2016 12:05:26 -0400 References: <1468499383-17840-1-git-send-email-den@openvz.org> <1468499383-17840-4-git-send-email-den@openvz.org> From: Eric Blake Message-ID: <5787B83C.5020306@redhat.com> Date: Thu, 14 Jul 2016 10:05:16 -0600 MIME-Version: 1.0 In-Reply-To: <1468499383-17840-4-git-send-email-den@openvz.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="OrNdsu5omfjJTjVvsUgHc2SDFH1mDUnvp" Subject: Re: [Qemu-devel] [PATCH v6 3/6] tests: in IDE and AHCI tests perform DMA write before flushing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Evgeny Yakovlev , Max Reitz , Stefan Hajnoczi , John Snow This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OrNdsu5omfjJTjVvsUgHc2SDFH1mDUnvp From: Eric Blake To: "Denis V. Lunev" , qemu-block@nongnu.org, qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Evgeny Yakovlev , Max Reitz , Stefan Hajnoczi , John Snow Message-ID: <5787B83C.5020306@redhat.com> Subject: Re: [Qemu-devel] [PATCH v6 3/6] tests: in IDE and AHCI tests perform DMA write before flushing References: <1468499383-17840-1-git-send-email-den@openvz.org> <1468499383-17840-4-git-send-email-den@openvz.org> In-Reply-To: <1468499383-17840-4-git-send-email-den@openvz.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/14/2016 06:29 AM, Denis V. Lunev wrote: > From: Evgeny Yakovlev >=20 > Due to changes in flush behaviour clean disks stopped generating > flush_to_disk events and IDE and AHCI tests that test flush commands > started to fail. >=20 > This change adds additional DMA writes to affected tests before sending= > flush commands so that bdrv_flush actually generates flush_to_disk even= t. >=20 > Signed-off-by: Evgeny Yakovlev > Signed-off-by: Denis V. Lunev > Reviewed-by: Paolo Bonzini > CC: Kevin Wolf > CC: Max Reitz > CC: Stefan Hajnoczi > CC: Fam Zheng > CC: John Snow > --- > tests/ahci-test.c | 34 ++++++++++++++++++++++++++++++++-- > tests/ide-test.c | 43 +++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 75 insertions(+), 2 deletions(-) >=20 > diff --git a/tests/ahci-test.c b/tests/ahci-test.c > index 57dc44c..d707714 100644 > --- a/tests/ahci-test.c > +++ b/tests/ahci-test.c > @@ -1063,11 +1063,34 @@ static void test_dma_fragmented(void) > g_free(tx); > } > =20 > +/* > + * Write sector 0 with random data to make AHCI storage dirty If we ever have a case where we open a disk without specifying -raw, the random data _might_ resemble some other format and cause probe to misbehave; as such, we also have code in the block layer that specifically prevents writes to sector 0 for some data. Should you pick a different sector than 0, so as to avoid any (remote) possibility that the random data could change probe results or be rejected? --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --OrNdsu5omfjJTjVvsUgHc2SDFH1mDUnvp 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/ iQEcBAEBCAAGBQJXh7g8AAoJEKeha0olJ0NqHQEIAIodYlKzxYhDmmPpU5f1f9aY 7YXetIG69k58/KptaIVaFf6aetsxaq3ucoL0+7/65qtW+OlYDLh4kszm5cd+MFm7 Gp0nZ2KERaQT7+TAOSZEWM5iyis+eIVUmIQ60wQmUPc69pTCbTeKWOde1ZeXHlmj 0Yk+rLGkz8pDsWuR4a04CEIE85MD2M5I4HQNtpw5OHvgsJtG/1iE/jWlSGzi9JOm OKi62qrL9EdgPzrATokjDFsps2AURVOtJoRRq3/J2LW5Z/oqhmqP1bJL+GLBxlcz d+8V6aI2ZmndNsWpK6MyIjOcFp9ajchbh+KbaZQuteg7T86BdGFBgH8Uyv5I86g= =0WQj -----END PGP SIGNATURE----- --OrNdsu5omfjJTjVvsUgHc2SDFH1mDUnvp--