From patchwork Wed May 4 23:55:15 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Blake X-Patchwork-Id: 9019661 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 241E89F30C for ; Wed, 4 May 2016 23:59:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 52666203EB for ; Wed, 4 May 2016 23:59:47 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 77BB4203E3 for ; Wed, 4 May 2016 23:59:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay6eO-0005pm-MA; Wed, 04 May 2016 23:56:16 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ay6eO-0005pc-5U for xen-devel@lists.xensource.com; Wed, 04 May 2016 23:56:16 +0000 Received: from [85.158.143.35] by server-3.bemta-6.messagelabs.com id 67/62-07120-E1C8A275; Wed, 04 May 2016 23:56:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysWW7jK5cj1a 4wd9Fihb3prxnd2D02N63iz2AMYo1My8pvyKBNeN8+wKWgoM8FRuWX2NrYJzI2cXIxSEksJtJ 4vb+s8xdjJxAznFGiTM/WbsYOTjYBFQkfq2KAQmLCEhK/O46zQxSzyzwiVFi4vsTLCAJYQFPi ZUHT7KB2CwCqhLXln5lArF5BZwk/m24xQ5icwLZT2beh5rvKHFz6hawXgkBbYlTG7+zT2DkXs DIsIpRvTi1qCy1SNdIL6koMz2jJDcxM0fX0MBMLze1uDgxPTUnMalYLzk/dxMj0LsMQLCDcdl fp0OMkhxMSqK8k9K0woX4kvJTKjMSizPii0pzUosPMcpwcChJ8FZ0AeUEi1LTUyvSMnOAYQaT luDgURLh/QyS5i0uSMwtzkyHSJ1i1OU48PTNXiYhlrz8vFQpcd6JIEUCIEUZpXlwI2Ahf4lRV kqYlxHoKCGegtSi3MwSVPlXjOIcjErCvOtApvBk5pXAbXoFdAQT0BHv52qCHFGSiJCSamAUm+ mmJLrVhV+6ZNqStExjdabPb51kD3tNuP8qfO68piMvHhxfwbrp+4PA45vrW9tX59+dtUyx29H is0qSddSk4m+n5rcsvm3Rk6W0NznDxMfz/ozZTZkvfU5aH4ppmzYtf3v4ork/NLLEja84d6+b vbzLaOFH9rPPF/7nbZgnfsqdO1RgTeEuJZbijERDLeai4kQAkTvO+nQCAAA= X-Env-Sender: eblake@redhat.com X-Msg-Ref: server-15.tower-21.messagelabs.com!1462406173!12636059!1 X-Originating-IP: [209.132.183.28] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMjA5LjEzMi4xODMuMjggPT4gNTQwNjQ=\n X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 41491 invoked from network); 4 May 2016 23:56:14 -0000 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by server-15.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 May 2016 23:56:14 -0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CD7DC3DD47; Wed, 4 May 2016 23:56:12 +0000 (UTC) Received: from red.redhat.com (ovpn-113-154.phx2.redhat.com [10.3.113.154]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u44NtUhZ025795; Wed, 4 May 2016 19:56:11 -0400 From: Eric Blake To: qemu-devel@nongnu.org Date: Wed, 4 May 2016 17:55:15 -0600 Message-Id: <1462406126-22946-10-git-send-email-eblake@redhat.com> In-Reply-To: <1462406126-22946-1-git-send-email-eblake@redhat.com> References: <1462406126-22946-1-git-send-email-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 Cc: kwolf@redhat.com, Stefano Stabellini , qemu-block@nongnu.org, Max Reitz , "open list:X86" , Anthony Perard Subject: [Xen-devel] [PATCH v6 09/20] xen_disk: Switch to byte-based aio block access X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sector-based blk_aio_readv() and blk_aio_writev() should die; switch to byte-based blk_aio_preadv() and blk_aio_pwritev() instead. Signed-off-by: Eric Blake --- hw/block/xen_disk.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index d4ce380..064c116 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -554,9 +554,8 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq) block_acct_start(blk_get_stats(blkdev->blk), &ioreq->acct, ioreq->v.size, BLOCK_ACCT_READ); ioreq->aio_inflight++; - blk_aio_readv(blkdev->blk, ioreq->start / BLOCK_SIZE, - &ioreq->v, ioreq->v.size / BLOCK_SIZE, - qemu_aio_complete, ioreq); + blk_aio_preadv(blkdev->blk, ioreq->start, &ioreq->v, 0, + qemu_aio_complete, ioreq); break; case BLKIF_OP_WRITE: case BLKIF_OP_FLUSH_DISKCACHE: @@ -569,9 +568,8 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq) ioreq->req.operation == BLKIF_OP_WRITE ? BLOCK_ACCT_WRITE : BLOCK_ACCT_FLUSH); ioreq->aio_inflight++; - blk_aio_writev(blkdev->blk, ioreq->start / BLOCK_SIZE, - &ioreq->v, ioreq->v.size / BLOCK_SIZE, - qemu_aio_complete, ioreq); + blk_aio_pwritev(blkdev->blk, ioreq->start, &ioreq->v, 0, + qemu_aio_complete, ioreq); break; case BLKIF_OP_DISCARD: {