Received: from eggs.gnu.org ([209.51.188.92]:45903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1goSEY-0001au-Iw for qemu-devel@nongnu.org; Tue, 29 Jan 2019 07:11:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1goSEX-0006Pf-UM for qemu-devel@nongnu.org; Tue, 29 Jan 2019 07:11:18 -0500 From: Markus Armbruster References: <271482fe-741a-6a15-15fd-181d4e55a8c4@redhat.com> <4236ceac-fd50-ad04-811a-0be7b3dbd667@redhat.com> <87tvhsy6en.fsf@dusky.pond.sub.org> Date: Tue, 29 Jan 2019 13:11:07 +0100 In-Reply-To: (Alberto Garcia's message of "Tue, 29 Jan 2019 11:03:27 +0100") Message-ID: <87tvhrhdes.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] Consistency of iotests 093 and 136 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alberto Garcia Cc: Peter Xu , "qemu-devel@nongnu.org" , Qemu-block , Max Reitz Alberto Garcia writes: > On Mon 28 Jan 2019 07:38:08 PM CET, Markus Armbruster wrote: > >>> 093 submits several I/O requests using aio_read and aio_write with >>> hmp_qemu_io(), then advances the clock using clock_step and finally >>> calls query-blockstats to see how much of the I/O has been completed >>> (it's an I/O throttling test). >>> >>> The expectation is that by the time query-blockstats is called all >>> submitted I/O requests have been processed (up to the amount allowed >>> by the throttling limits). >> >> Assumptions like "when we see the reply to QMP command X, surely the >> main loop has completed doing Y" are problematic. When possible, rely >> on something more direct, such as a query command that shows you >> whether Y has been completed. > > Right, but how to do that for aio_read / aio_write ? Fair question. What exactly do you need to wait for?