From nobody Mon Nov 3 20:19:29 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506000013448220.7789864464993; Thu, 21 Sep 2017 06:20:13 -0700 (PDT) Received: from localhost ([::1]:53666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv1Om-0006Gc-KI for importer@patchew.org; Thu, 21 Sep 2017 09:20:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv1Mo-000580-Qu for qemu-devel@nongnu.org; Thu, 21 Sep 2017 09:18:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dv1Mn-00049c-CO for qemu-devel@nongnu.org; Thu, 21 Sep 2017 09:18:10 -0400 Received: from smtp1.ntua.gr ([2001:648:2000:de::183]:39102) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dv1Md-00043H-J0; Thu, 21 Sep 2017 09:17:59 -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 v8LDHojL083315 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Sep 2017 16:17:50 +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: Thu, 21 Sep 2017 16:17:06 +0300 Message-Id: <20170921131707.17364-3-el13635@mail.ntua.gr> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170921131707.17364-1-el13635@mail.ntua.gr> References: <20170921131707.17364-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 v2 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Reviewed-by: Stefan Hajnoczi Signed-off-by: Manos Pitsidianakis Reviewed-by: Fam Zheng --- include/block/block_int.h | 2 +- block/io.c | 4 ++-- block/qed.c | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 21950cfda3..205d088271 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -362,7 +362,7 @@ struct BlockDriver { * manage scheduled I/O requests, or toggle an internal state. After an * bdrv_co_drain_end() invocation 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); =20 void (*bdrv_add_child)(BlockDriverState *parent, BlockDriverState *chi= ld, 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 =3D data->bs; =20 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, boo= l begin) { BdrvCoDrainData data =3D { .bs =3D bs, .done =3D false, .begin =3D beg= in}; =20 - 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 !=3D 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(BlockDriverStat= e *bs, } } =20 -static void coroutine_fn bdrv_qed_co_drain(BlockDriverState *bs) +static void coroutine_fn bdrv_qed_co_drain_begin(BlockDriverState *bs) { BDRVQEDState *s =3D bs->opaque; =20 @@ -1608,7 +1608,7 @@ static BlockDriver bdrv_qed =3D { .bdrv_check =3D bdrv_qed_check, .bdrv_detach_aio_context =3D bdrv_qed_detach_aio_context, .bdrv_attach_aio_context =3D bdrv_qed_attach_aio_context, - .bdrv_co_drain =3D bdrv_qed_co_drain, + .bdrv_co_drain_begin =3D bdrv_qed_co_drain_begin, }; =20 static void bdrv_qed_init(void) --=20 2.11.0