From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0taV-0000dw-2U for qemu-devel@nongnu.org; Tue, 06 Sep 2011 07:13:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0taQ-0005a0-5R for qemu-devel@nongnu.org; Tue, 06 Sep 2011 07:13:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0taP-0005Zq-Ui for qemu-devel@nongnu.org; Tue, 06 Sep 2011 07:13:02 -0400 Message-ID: <4E6600ED.2060200@redhat.com> Date: Tue, 06 Sep 2011 13:15:57 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1315239111-13874-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1315239111-13874-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi: fix accounting of writes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, hch@lst.de Am 05.09.2011 18:11, schrieb Paolo Bonzini: > Writes go through scsi_write_complete at least twice, the first time > to get some data without having actually written anything. Because > of this, the first time scsi_write_complete is called it will call > bdrv_acct_done and account a read incorrectly. Fix this by looking > at the aiocb. I am doing the same in scsi_read_complete for symmetry, > but it is only needed in the (bogus) case of bdrv_aio_readv returning > NULL. > > Signed-off-by: Paolo Bonzini Thanks, applied to the block branch. Kevin