From patchwork Wed May 4 09:39:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 9011991 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DB8ECBF29F for ; Wed, 4 May 2016 09:46:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5388C2038F for ; Wed, 4 May 2016 09:46:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2FC22038D for ; Wed, 4 May 2016 09:46:58 +0000 (UTC) Received: from localhost ([::1]:46689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axtOQ-0000bT-Ta for patchwork-qemu-devel@patchwork.kernel.org; Wed, 04 May 2016 05:46:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39661) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axtIT-0005vT-46 for qemu-devel@nongnu.org; Wed, 04 May 2016 05:40:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axtIH-0005vi-BD for qemu-devel@nongnu.org; Wed, 04 May 2016 05:40:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axtHz-0005er-4e; Wed, 04 May 2016 05:40:15 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (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 9B45180084; Wed, 4 May 2016 09:39:58 +0000 (UTC) Received: from noname.str.redhat.com. (dhcp-192-197.str.redhat.com [10.33.192.197]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u449dYeC000875; Wed, 4 May 2016 05:39:57 -0400 From: Kevin Wolf To: qemu-block@nongnu.org Date: Wed, 4 May 2016 11:39:25 +0200 Message-Id: <1462354765-14037-15-git-send-email-kwolf@redhat.com> In-Reply-To: <1462354765-14037-1-git-send-email-kwolf@redhat.com> References: <1462354765-14037-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 14/14] blockjob: Remove BlockJob.bs X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, berto@igalia.com, jcody@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, jsnow@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 There is a single remaining user in qemu-img, which can be trivially converted to using BlockJob.blk instead. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- blockjob.c | 1 - include/block/blockjob.h | 1 - qemu-img.c | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/blockjob.c b/blockjob.c index 01b58c7..c0d8ee9 100644 --- a/blockjob.c +++ b/blockjob.c @@ -83,7 +83,6 @@ void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs, job->driver = driver; job->id = g_strdup(bdrv_get_device_name(bs)); - job->bs = bs; job->blk = blk; job->cb = cb; job->opaque = opaque; diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 32012af..86d2807 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -82,7 +82,6 @@ struct BlockJob { const BlockJobDriver *driver; /** The block device on which the job is operating. */ - BlockDriverState *bs; /* TODO Remove */ BlockBackend *blk; /** diff --git a/qemu-img.c b/qemu-img.c index 46f2a6d..77148c2 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -775,7 +775,7 @@ static void common_block_job_cb(void *opaque, int ret) static void run_block_job(BlockJob *job, Error **errp) { - AioContext *aio_context = bdrv_get_aio_context(job->bs); + AioContext *aio_context = blk_get_aio_context(job->blk); do { aio_poll(aio_context, true);