From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0y5a-00044r-BE for qemu-devel@nongnu.org; Thu, 12 May 2016 17:24:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0y5X-0006pA-Sp for qemu-devel@nongnu.org; Thu, 12 May 2016 17:24:09 -0400 References: <1463063749-2201-1-git-send-email-kwolf@redhat.com> <1463063749-2201-65-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5734F46F.40100@redhat.com> Date: Thu, 12 May 2016 15:23:59 -0600 MIME-Version: 1.0 In-Reply-To: <1463063749-2201-65-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="xMOvnm9crGEUSc1OcmrA869QpIF1h1QdS" Subject: Re: [Qemu-devel] [PULL 64/69] qemu-io: Add 'write -f' to test FUA flag List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --xMOvnm9crGEUSc1OcmrA869QpIF1h1QdS Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/12/2016 08:35 AM, Kevin Wolf wrote: > From: Eric Blake >=20 > Make it easier to test block drivers with BDRV_REQ_FUA in > .supported_write_flags, by adding the '-f' flag to qemu-io to > conditionally pass the flag through to specific writes ('write', > 'write -z', 'writev', 'aio_write', 'aio_write -z'). You'll want > to use 'qemu-io -t none' to actually make -f useful (as > otherwise, the default writethrough mode automatically sets the > FUA bit on every write). >=20 > Signed-off-by: Eric Blake > Message-id: 1462677405-4752-6-git-send-email-eblake@redhat.com > Reviewed-by: Max Reitz > Signed-off-by: Max Reitz > --- > qemu-io-cmds.c | 57 +++++++++++++++++++++++++++++++++++++++++---------= ------- > 1 file changed, 41 insertions(+), 16 deletions(-) >=20 > @@ -935,6 +938,7 @@ static void write_help(void) > +" -f, -- use Force Unit Access semantics\n" > @@ -951,7 +955,7 @@ static const cmdinfo_t write_cmd =3D { > - .args =3D "[-bcCqz] [-P pattern] off len", > + .args =3D "[-bcCfqz] [-P pattern] off len", > @@ -969,7 +974,7 @@ static int write_f(BlockBackend *blk, int argc, cha= r **argv) > - while ((c =3D getopt(argc, argv, "bcCpP:qz")) !=3D -1) { > + while ((c =3D getopt(argc, argv, "bcCfpP:qz")) !=3D -1) { > @@ -980,6 +985,9 @@ static int write_f(BlockBackend *blk, int argc, cha= r **argv) > case 'C': > Cflag =3D true; > break; > + case 'f': Four places to touch per added option. 'write -f' is okay... > @@ -1097,6 +1110,7 @@ writev_help(void) > +" -f, -- use Force Unit Access semantics\n" > @@ -1108,7 +1122,7 @@ static const cmdinfo_t writev_cmd =3D { > - .args =3D "[-Cq] [-P pattern] off len [len..]", > + .args =3D "[-Cfq] [-P pattern] off len [len..]", > @@ -1131,6 +1146,9 @@ static int writev_f(BlockBackend *blk, int argc, = char **argv) > + case 'f': Whoops - forgot to update getopt() for 'writev -f'. Followup patch coming shortly. I also botched it in 65/69, for 'aio_write -z -u'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --xMOvnm9crGEUSc1OcmrA869QpIF1h1QdS 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/ iQEcBAEBCAAGBQJXNPRvAAoJEKeha0olJ0NqNhcH/jG0q95v1WTTxlL+ZIJRxTFE WH2yMqY7KCV0e+D8sUPRazI54df+ISmCf7J1TdogRknLuGNU2J4pkoLbA9xlfMTO 92DKTyiscjO5VjWavmohTOdgPs7TKcohrA0IZRVXfHN49gtlqcSPeV1hpFAEnw4B kCLUNLvbcFJwogx3xo1lM5L0pC7FTspmyABfwjMLlH6rP2CrNzQbvwb101+6/sJZ 3W+F0IWM0TN0wjaBF9UrQ+E3us4YU+WHSJP8IBrv1FChyo0JOtdD8z2DIWbi/WrB 5ogxQWHl+m9sdPa55vR8b8fp0w+hbNKmWRJhFbsLlYox20M46KZ2KxJHxfBzKM4= =9CRw -----END PGP SIGNATURE----- --xMOvnm9crGEUSc1OcmrA869QpIF1h1QdS--