From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhImx-0007H6-L7 for qemu-devel@nongnu.org; Thu, 14 Jul 2011 06:05:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhImt-0006cA-4a for qemu-devel@nongnu.org; Thu, 14 Jul 2011 06:04:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIms-0006c5-MF for qemu-devel@nongnu.org; Thu, 14 Jul 2011 06:04:55 -0400 Message-ID: <4E1EBFEC.6060606@redhat.com> Date: Thu, 14 Jul 2011 12:07:40 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <4E131D0D.307@redhat.com> <20110711125432.GA19686@stefanha-thinkpad.localdomain> <20110711163226.GA10924@amt.cnet> <4E1C009C.1010408@redhat.com> <4E1C71F2.4030507@redhat.com> <4E1EBD24.9090308@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] live block copy/stream/snapshot discussion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Anthony Liguori , Dor Laor , Stefan Hajnoczi , Marcelo Tosatti , qemu-devel , Avi Kivity , Adam Litke Am 14.07.2011 12:00, schrieb Stefan Hajnoczi: > On Thu, Jul 14, 2011 at 10:55 AM, Kevin Wolf wrote: >> Am 14.07.2011 11:39, schrieb Stefan Hajnoczi: >>> Events: >>> >>> On completion the BLOCK_STREAM_COMPLETED event is raised with the following >>> fields: >>> >>> - device: device name (json-string) >>> - len: size of the device, in bytes (json-int) >>> - offset: last offset of completed I/O, in bytes (json-int) >>> - error: error message (json-string, only on error) >>> >>> The completion event is raised both on success and on failure. >> >> Why do len/offset matter in a completion event? > > For completeness. You could see it as telling you how much progress > was made before an error occurred. In the success case offset will > always be equal to len. But in the error case you get the last > completed progress before error, which could be useful (for example if > you weren't polling but want to display "Streaming virtio-blk0 failed > at 33%"). Makes sense. We also need to define the possible error messages, and probably use an enum instead of a string. Kevin