From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51495) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bK1Sa-0006bC-NL for qemu-devel@nongnu.org; Mon, 04 Jul 2016 06:50:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bK1SY-0001io-OC for qemu-devel@nongnu.org; Mon, 04 Jul 2016 06:50:39 -0400 Date: Mon, 4 Jul 2016 12:50:30 +0200 From: Kevin Wolf Message-ID: <20160704105030.GD5399@noname.redhat.com> References: <1467296007-12252-1-git-send-email-kwolf@redhat.com> <1467296007-12252-6-git-send-email-kwolf@redhat.com> <7b9f7996-dd79-f393-fcb7-97751cfa6dd0@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline In-Reply-To: <7b9f7996-dd79-f393-fcb7-97751cfa6dd0@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 5/6] qemu-iotests: Test setting WCE with qdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: qemu-block@nongnu.org, eblake@redhat.com, qemu-devel@nongnu.org --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Am 02.07.2016 um 18:15 hat Max Reitz geschrieben: > On 30.06.2016 16:13, Kevin Wolf wrote: > > + echo "info block" \ > > + | run_qemu -drive "$drive,cache=3D$cache" \ > > + -device "ide-hd,drive=3Dnone0$wce" \ > > + | grep -e "Testing" -e "Cache mode" >=20 > Something interesting: If you'd specify the drive through a node name, > then the BDS tree has two BBs, one implicitly created with -drive (this > one is named (automatically) and owned by the monitor) and an anonymous > one for the device. If the device then overrides the cache mode, this > will not be reflected in the monitor-owned BB. "info block" (and > query-block) use the monitor BBs, however, so they'll report the BB on > top of the BDS tree in question to be in whatever mode has been > specified in -drive, whereas the mode the device uses for accessing that > BDS tree actually has nothing to do with that. >=20 > So the user has no way of inquiring the cache mode used by the device, > and they actually get presented misleading information. Yes, I know. Originally I wanted to add test cases that use node-name, but then it occurred to me that this would be pretty pointless. I'm not sure yet what the conclusion is. Change query-block to include anonymous BBs that are owned by devices? A new query command? Add the information to info qtree and whatever the QMP version of it is (if it even exists)? Kevin --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAEBAgAGBQJXej92AAoJEH8JsnLIjy/Wf20P/3r6ckyCoLSrXFCsSZkQObNO 5YNrUL7jl/wlImUdfPgq1LzDuXyKyXhXnwX9dyh3yFxqD5mfF/sMuYW5wMAw5wG8 ReBin5JCV+CYEGS2u1JMwn54h/SIaVhg0HoXU81VlsYgnPwcQG9kWVxpSTsMQpmR jxEPIiHlhUil9UhaS1IRk+xvwmEUaffpL8qnbNRJDhN6DL0y29fNGgwC9vIawfxx 1KEXBQ90tUSE8gIxQORGPhwcy1sKfSijreZDDZ3b757u4AXXIJ4P8HKtM4Vj6nUH VnwGzaGKw1yepqDPqHv5I2IxlG0BE9RRCP/bvatC1qad5rCiNWTY/KBj2EdQTFwq O+i++bTWqQLQjvJ0vmyhn7AfHHMdNBS4SZVQwtJ45P3wNX/FbV3JkaOe6SVrMiVN w+C3hjt8sCcKeo2QyxIGfsLTxbfHTeSs5EDKQXH4gUgycltKae/3K0AEwVtAQ6h9 7LZOmuYSKJQnLqCVyE3jjqFEwyKjfsOgpv9RsUPrmzcvBY+m/T5RS6iljeXdUJ8P CZyYJo4qmEFeNo7xmb2NdfLL+VzkVSetWGhyNsktTEzJEMbQAuP5PgugrG3BrnLf f8i2V8ZSTMz6ixg86SiHzttrcdDH+bGu301y3K27dKuaJNssgOOcwn+xniotKWwP c5j5bytBc40xeejYzKu/ =oxQr -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2--