From patchwork Sat Sep 23 11:14:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manos Pitsidianakis X-Patchwork-Id: 9967471 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 57A28602CB for ; Sat, 23 Sep 2017 11:16:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FEE129881 for ; Sat, 23 Sep 2017 11:16:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4490429884; Sat, 23 Sep 2017 11:16:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id D474C29881 for ; Sat, 23 Sep 2017 11:16:22 +0000 (UTC) Received: from localhost ([::1]:34469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dviQ1-0004av-RJ for patchwork-qemu-devel@patchwork.kernel.org; Sat, 23 Sep 2017 07:16:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56662) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dviOP-0004KD-Oc for qemu-devel@nongnu.org; Sat, 23 Sep 2017 07:14:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dviOO-0001BH-Ku for qemu-devel@nongnu.org; Sat, 23 Sep 2017 07:14:41 -0400 Received: from smtp1.ntua.gr ([2001:648:2000:de::183]:13167) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dviOI-00016c-5l; Sat, 23 Sep 2017 07:14:34 -0400 Received: from mail.ntua.gr (carp0.noc.ntua.gr [147.102.222.60]) (authenticated bits=0) by smtp1.ntua.gr (8.15.2/8.15.2) with ESMTPSA id v8NBEU2Q074782 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 23 Sep 2017 14:14:30 +0300 (EEST) (envelope-from el13635@mail.ntua.gr) X-Authentication-Warning: smtp1.ntua.gr: Host carp0.noc.ntua.gr [147.102.222.60] claimed to be mail.ntua.gr From: Manos Pitsidianakis To: qemu-devel Date: Sat, 23 Sep 2017 14:14:10 +0300 Message-Id: <20170923111411.18626-3-el13635@mail.ntua.gr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170923111411.18626-1-el13635@mail.ntua.gr> References: <20170923111411.18626-1-el13635@mail.ntua.gr> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:648:2000:de::183 Subject: [Qemu-devel] [PATCH v3 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: Kevin Wolf , Fam Zheng , Stefan Hajnoczi , qemu-block , Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Manos Pitsidianakis Reviewed-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 9ebdeb6db0..51575d22b6 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 b0a10ad3ef..65e8094d7c 100644 --- a/block/io.c +++ b/block/io.c @@ -162,7 +162,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); } @@ -176,7 +176,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)