From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIip-0006F2-T9 for qemu-devel@nongnu.org; Thu, 14 Jul 2011 06:00:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QhIio-0005uS-DS for qemu-devel@nongnu.org; Thu, 14 Jul 2011 06:00:43 -0400 Received: from mail-yx0-f173.google.com ([209.85.213.173]:41102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QhIio-0005uO-2l for qemu-devel@nongnu.org; Thu, 14 Jul 2011 06:00:42 -0400 Received: by yxt3 with SMTP id 3so33757yxt.4 for ; Thu, 14 Jul 2011 03:00:41 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <4E1EBD24.9090308@redhat.com> 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> Date: Thu, 14 Jul 2011 11:00:40 +0100 Message-ID: From: Stefan Hajnoczi Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] live block copy/stream/snapshot discussion List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: Anthony Liguori , Dor Laor , Stefan Hajnoczi , Marcelo Tosatti , qemu-devel , Avi Kivity , Adam Litke On Thu, Jul 14, 2011 at 10:55 AM, Kevin Wolf wrote: > Am 14.07.2011 11:39, schrieb Stefan Hajnoczi: >> =A0Events: >> >> =A0On completion the BLOCK_STREAM_COMPLETED event is raised with the fol= lowing >> =A0fields: >> >> =A0- device: device name (json-string) >> =A0- len: =A0 =A0size of the device, in bytes (json-int) >> =A0- offset: last offset of completed I/O, in bytes (json-int) >> =A0- error: =A0error message (json-string, only on error) >> >> =A0The 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%"). Stefan