From patchwork Thu Sep 11 05:41:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 388071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 51E381400A8 for ; Thu, 11 Sep 2014 15:50:46 +1000 (EST) Received: from localhost ([::1]:33692 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRxHI-0001N2-9b for incoming@patchwork.ozlabs.org; Thu, 11 Sep 2014 01:50:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRx9u-0004Q0-5x for qemu-devel@nongnu.org; Thu, 11 Sep 2014 01:43:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRx9m-0006BI-OB for qemu-devel@nongnu.org; Thu, 11 Sep 2014 01:43:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:22197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRx9m-0006B7-FS for qemu-devel@nongnu.org; Thu, 11 Sep 2014 01:42:58 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8B5gprG025691 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 11 Sep 2014 01:42:51 -0400 Received: from fam-t430.nay.redhat.com (dhcp-14-161.nay.redhat.com [10.66.14.161]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8B5fWBT026229; Thu, 11 Sep 2014 01:42:46 -0400 From: Fam Zheng To: qemu-devel@nongnu.org Date: Thu, 11 Sep 2014 13:41:20 +0800 Message-Id: <1410414088-4419-15-git-send-email-famz@redhat.com> In-Reply-To: <1410414088-4419-1-git-send-email-famz@redhat.com> References: <1410414088-4419-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Benoit Canet , Peter Lieven , Stefan Hajnoczi , Liu Yuan , Paolo Bonzini Subject: [Qemu-devel] [PATCH v6 14/22] qed: Drop qed_aiocb_info.cancel X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Also drop the now unused ->finished field. Signed-off-by: Fam Zheng --- block/qed.c | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/block/qed.c b/block/qed.c index ba395af..07cdb47 100644 --- a/block/qed.c +++ b/block/qed.c @@ -18,22 +18,8 @@ #include "qapi/qmp/qerror.h" #include "migration/migration.h" -static void qed_aio_cancel(BlockDriverAIOCB *blockacb) -{ - QEDAIOCB *acb = (QEDAIOCB *)blockacb; - AioContext *aio_context = bdrv_get_aio_context(blockacb->bs); - bool finished = false; - - /* Wait for the request to finish */ - acb->finished = &finished; - while (!finished) { - aio_poll(aio_context, true); - } -} - static const AIOCBInfo qed_aiocb_info = { .aiocb_size = sizeof(QEDAIOCB), - .cancel = qed_aio_cancel, }; static int bdrv_qed_probe(const uint8_t *buf, int buf_size, @@ -918,18 +904,12 @@ static void qed_aio_complete_bh(void *opaque) BlockDriverCompletionFunc *cb = acb->common.cb; void *user_opaque = acb->common.opaque; int ret = acb->bh_ret; - bool *finished = acb->finished; qemu_bh_delete(acb->bh); qemu_aio_release(acb); /* Invoke callback */ cb(user_opaque, ret); - - /* Signal cancel completion */ - if (finished) { - *finished = true; - } } static void qed_aio_complete(QEDAIOCB *acb, int ret) @@ -1396,7 +1376,6 @@ static BlockDriverAIOCB *qed_aio_setup(BlockDriverState *bs, opaque, flags); acb->flags = flags; - acb->finished = NULL; acb->qiov = qiov; acb->qiov_offset = 0; acb->cur_pos = (uint64_t)sector_num * BDRV_SECTOR_SIZE;