Message ID | 1392920002-18522-2-git-send-email-stefano.stabellini@eu.citrix.com |
---|---|
State | Accepted |
Commit | 58da5b1e01a586eb5a52ba3eec342d6828269839 |
Headers | show
Return-Path: <patchwork-forward+bncBDWMDO7X3ICBBSEMTGMAKGQEVZY2AII@linaro.org> X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 59003203C6 for <linaro@patches.linaro.org>; Thu, 20 Feb 2014 18:15:36 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id le5sf4069938vcb.7 for <linaro@patches.linaro.org>; Thu, 20 Feb 2014 10:15:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=sStZ+fbqoxEe7uQF4tgfSRxqVD6eLa/vekQJix+q/MI=; b=YQR9HATF9w9Tb62bc8eOQ9rUZB2tS+wvwvkgFshIAgOLm71z6Bi572t6JRJiMNSJU1 l/oQVeKNXRj1y2jCI7I/MIdLVKsuLz0NxDcfT2rsJjGOwLc5El4dSUB3/mR8g9h0gMfo FtqdlP3HnNNtKhxeVqcNOc78PgAb4fWTlJg0AAMIv6QiDj8Mf/MxsD12XXEnPmuD21d7 QzgFM558obl5y5ZIM+H9sttJHprrRVYEa4n2Y5pUme2b181lwG6uT+Y0pmI2VF3ATeFK in/g/h8vBAfVj402HxhrA8/R8GgSRP+KL2VhcoyRWgt+vxqYXE4XQlPrnA4sJn/2rqJm BR8w== X-Gm-Message-State: ALoCoQkOT9eW2qvuAExPH2pS5WldFZJMkOxEI0QcKSpyviXSvOISJCrZoWy8u+lfqq4E61hc58JL X-Received: by 10.236.129.41 with SMTP id g29mr1172898yhi.20.1392920136070; Thu, 20 Feb 2014 10:15:36 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.28.6 with SMTP id 6ls664336qgy.16.gmail; Thu, 20 Feb 2014 10:15:35 -0800 (PST) X-Received: by 10.220.92.135 with SMTP id r7mr1813988vcm.11.1392920135912; Thu, 20 Feb 2014 10:15:35 -0800 (PST) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id tr5si1797223vdc.52.2014.02.20.10.15.35 for <patchwork-forward@linaro.org> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 10:15:35 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id oy12so2228407veb.28 for <patchwork-forward@linaro.org>; Thu, 20 Feb 2014 10:15:35 -0800 (PST) X-Received: by 10.52.246.227 with SMTP id xz3mr1501723vdc.95.1392920135817; Thu, 20 Feb 2014 10:15:35 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp78844vcz; Thu, 20 Feb 2014 10:15:35 -0800 (PST) X-Received: by 10.140.108.116 with SMTP id i107mr3422265qgf.80.1392920134689; Thu, 20 Feb 2014 10:15:34 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id i7si689047qaf.90.2014.02.20.10.15.34 for <multiple recipients> (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 20 Feb 2014 10:15:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from <xen-devel-bounces@lists.xen.org>) id 1WGY7w-0000sU-6j; Thu, 20 Feb 2014 18:13:40 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from <Stefano.Stabellini@citrix.com>) id 1WGY7u-0000sB-Ja for xen-devel@lists.xensource.com; Thu, 20 Feb 2014 18:13:38 +0000 Received: from [85.158.137.68:27341] by server-13.bemta-3.messagelabs.com id E3/72-26923-1D546035; Thu, 20 Feb 2014 18:13:37 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-6.tower-31.messagelabs.com!1392920015!3192374!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28015 invoked from network); 20 Feb 2014 18:13:37 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 20 Feb 2014 18:13:37 -0000 X-IronPort-AV: E=Sophos;i="4.97,513,1389744000"; d="scan'208";a="104422168" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 20 Feb 2014 18:13:35 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Thu, 20 Feb 2014 13:13:34 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from <stefano.stabellini@eu.citrix.com>) id 1WGY7l-0006dM-AI; Thu, 20 Feb 2014 18:13:29 +0000 From: Stefano Stabellini <stefano.stabellini@eu.citrix.com> To: <anthony@codemonkey.ws> Date: Thu, 20 Feb 2014 18:13:22 +0000 Message-ID: <1392920002-18522-2-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <alpine.DEB.2.02.1402201759490.15812@kaball.uk.xensource.com> References: <alpine.DEB.2.02.1402201759490.15812@kaball.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: peter.maydell@linaro.org, olaf@aepfle.de, xen-devel@lists.xensource.com, Stefano Stabellini <stefano.stabellini@eu.citrix.com>, qemu-devel@nongnu.org, Anthony.Perard@citrix.com, pbonzini@redhat.com Subject: [Xen-devel] [PULL 2/2] xen_disk: fix io accounting X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: <patchwork-forward.linaro.org> List-Unsubscribe: <http://groups.google.com/a/linaro.org/group/patchwork-forward/subscribe>, <mailto:googlegroups-manage+836684582541+unsubscribe@googlegroups.com> List-Post: <http://groups.google.com/a/linaro.org/group/patchwork-forward/post>, <mailto:patchwork-forward@linaro.org> List-Help: <http://support.google.com/a/linaro.org/bin/topic.py?topic=25838>, <mailto:patchwork-forward+help@linaro.org> List-Subscribe: <http://lists.xen.org/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xen.org?subject=subscribe> Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: <http://groups.google.com/a/linaro.org/group/patchwork-forward/> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 098f6c6..7f0f14a 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -483,7 +483,18 @@ static void qemu_aio_complete(void *opaque, int ret) ioreq->status = ioreq->aio_errors ? BLKIF_RSP_ERROR : BLKIF_RSP_OKAY; ioreq_unmap(ioreq); ioreq_finish(ioreq); - bdrv_acct_done(ioreq->blkdev->bs, &ioreq->acct); + switch (ioreq->req.operation) { + case BLKIF_OP_WRITE: + case BLKIF_OP_FLUSH_DISKCACHE: + if (!ioreq->req.nr_segments) { + break; + } + case BLKIF_OP_READ: + bdrv_acct_done(ioreq->blkdev->bs, &ioreq->acct); + break; + default: + break; + } qemu_bh_schedule(ioreq->blkdev->bh); }