From patchwork Fri Oct 13 13:49:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 825472 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) 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 3yD8Lg1Hgcz9sP1 for ; Sat, 14 Oct 2017 00:53:15 +1100 (AEDT) Received: from localhost ([::1]:50430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e30On-0001ht-77 for incoming@patchwork.ozlabs.org; Fri, 13 Oct 2017 09:53:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57697) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e30LP-0007oO-6D for qemu-devel@nongnu.org; Fri, 13 Oct 2017 09:49:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e30LO-0006Tb-4W for qemu-devel@nongnu.org; Fri, 13 Oct 2017 09:49:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51272) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e30LN-0006T2-S9 for qemu-devel@nongnu.org; Fri, 13 Oct 2017 09:49:42 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D87D581E18; Fri, 13 Oct 2017 13:49:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D87D581E18 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=stefanha@redhat.com Received: from localhost (unknown [10.36.118.232]) by smtp.corp.redhat.com (Postfix) with ESMTP id 71EF6619A4; Fri, 13 Oct 2017 13:49:40 +0000 (UTC) From: Stefan Hajnoczi To: Date: Fri, 13 Oct 2017 14:49:29 +0100 Message-Id: <20171013134930.20200-3-stefanha@redhat.com> In-Reply-To: <20171013134930.20200-1-stefanha@redhat.com> References: <20171013134930.20200-1-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 13 Oct 2017 13:49:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 2/3] block: rename bdrv_co_drain to bdrv_co_drain_begin 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: Peter Maydell , Stefan Hajnoczi , Manos Pitsidianakis Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Manos Pitsidianakis Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Manos Pitsidianakis Reviewed-by: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi --- include/block/block_int.h | 4 ++-- block/io.c | 4 ++-- block/qed.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index dd62f4d083..885c08e989 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -354,7 +354,7 @@ struct BlockDriver { int (*bdrv_probe_geometry)(BlockDriverState *bs, HDGeometry *geo); /** - * bdrv_co_drain is called if implemented in the beginning of a + * bdrv_co_drain_begin is called if implemented in the beginning of a * drain operation to drain and stop any internal sources of requests in * the driver. * bdrv_co_drain_end is called if implemented at the end of the drain. @@ -363,7 +363,7 @@ struct BlockDriver { * requests, or toggle an internal state. After the end of the drain new * requests will continue normally. */ - void coroutine_fn (*bdrv_co_drain)(BlockDriverState *bs); + void coroutine_fn (*bdrv_co_drain_begin)(BlockDriverState *bs); void coroutine_fn (*bdrv_co_drain_end)(BlockDriverState *bs); void (*bdrv_add_child)(BlockDriverState *parent, BlockDriverState *child, diff --git a/block/io.c b/block/io.c index 342fb571cf..0854e0fdac 100644 --- a/block/io.c +++ b/block/io.c @@ -165,7 +165,7 @@ static void coroutine_fn bdrv_drain_invoke_entry(void *opaque) BlockDriverState *bs = data->bs; if (data->begin) { - bs->drv->bdrv_co_drain(bs); + bs->drv->bdrv_co_drain_begin(bs); } else { bs->drv->bdrv_co_drain_end(bs); } @@ -179,7 +179,7 @@ static void bdrv_drain_invoke(BlockDriverState *bs, bool begin) { BdrvCoDrainData data = { .bs = bs, .done = false, .begin = begin}; - if (!bs->drv || (begin && !bs->drv->bdrv_co_drain) || + if (!bs->drv || (begin && !bs->drv->bdrv_co_drain_begin) || (!begin && !bs->drv->bdrv_co_drain_end)) { return; } diff --git a/block/qed.c b/block/qed.c index 28e2ec89e8..821dcaa055 100644 --- a/block/qed.c +++ b/block/qed.c @@ -265,7 +265,7 @@ static bool qed_plug_allocating_write_reqs(BDRVQEDState *s) assert(!s->allocating_write_reqs_plugged); if (s->allocating_acb != NULL) { /* Another allocating write came concurrently. This cannot happen - * from bdrv_qed_co_drain, but it can happen when the timer runs. + * from bdrv_qed_co_drain_begin, but it can happen when the timer runs. */ qemu_co_mutex_unlock(&s->table_lock); return false; @@ -358,7 +358,7 @@ static void bdrv_qed_attach_aio_context(BlockDriverState *bs, } } -static void coroutine_fn bdrv_qed_co_drain(BlockDriverState *bs) +static void coroutine_fn bdrv_qed_co_drain_begin(BlockDriverState *bs) { BDRVQEDState *s = bs->opaque; @@ -1608,7 +1608,7 @@ static BlockDriver bdrv_qed = { .bdrv_check = bdrv_qed_check, .bdrv_detach_aio_context = bdrv_qed_detach_aio_context, .bdrv_attach_aio_context = bdrv_qed_attach_aio_context, - .bdrv_co_drain = bdrv_qed_co_drain, + .bdrv_co_drain_begin = bdrv_qed_co_drain_begin, }; static void bdrv_qed_init(void)