From nobody Tue May 7 16:44:18 2024 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 1499206091678648.4620911469309; Tue, 4 Jul 2017 15:08:11 -0700 (PDT) Received: from localhost ([::1]:43122 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVzO-0001ta-C3 for importer@patchew.org; Tue, 04 Jul 2017 18:08:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48214) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVvM-0006up-Ra for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVvL-000877-Bv for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45164) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVvL-00086p-2m for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:03:59 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E4357D0EF; Tue, 4 Jul 2017 22:03:58 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 630735D722; Tue, 4 Jul 2017 22:03:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0E4357D0EF Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0E4357D0EF From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:12 +0200 Message-Id: <20170704220346.29244-2-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 04 Jul 2017 22:03:58 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 01/35] WIP: coroutine: annotate coroutine with clang thread safety attributes 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi , Stefan Weil Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" It is possible to use clang -Wthread-safety to do some basic coroutine checks: http://lists.llvm.org/pipermail/cfe-dev/2017-June/054372.html https://clang.llvm.org/docs/ThreadSafetyAnalysis.html This will basically check that you don't call accidentally a coroutine function from a non-coroutine, as this may crash at run time if the coroutine function yields. I had to modify clang to support annotations on typedef and function pointers, and check some function assignments/arguments. The end result is quire far from ready for upstream review, but could serve as basis for more checks or work. (https://github.com/elmarco/clang qemu-ta branch) Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/qemu/coroutine.h | 31 ++++++++++++++++++++++++++++++- util/coroutine-sigaltstack.c | 2 ++ util/coroutine-ucontext.c | 2 ++ util/coroutine-win32.c | 2 ++ util/qemu-coroutine.c | 2 ++ 5 files changed, 38 insertions(+), 1 deletion(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index a4509bd977..35ff394f51 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -28,6 +28,34 @@ * These functions are re-entrant and may be used outside the global mutex. */ =20 +/* clang thread-safety attributes, used for static analysis of the CFG */ +#if defined(__clang__) && (!defined(SWIG)) +#define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x)) +#else +#define THREAD_ANNOTATION_ATTRIBUTE__(x) +#endif + +#define TAA_ROLE \ + THREAD_ANNOTATION_ATTRIBUTE__(capability("role")) + +#define TAA_REQUIRES(...) \ + THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(__VA_ARGS__)) + +#define TAA_ACQUIRE(R) \ + THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(R)) + +#define TAA_RELEASE(R) \ + THREAD_ANNOTATION_ATTRIBUTE__(release_capability(R)) + +#define TAA_NO_ANALYSYS \ + THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis) + +typedef int TAA_ROLE coroutine_role; +extern coroutine_role _coroutine_fn; + +static inline void co_role_acquire(coroutine_role R) TAA_ACQUIRE(R) TAA_NO= _ANALYSYS {} +static inline void co_role_release(coroutine_role R) TAA_RELEASE(R) TAA_NO= _ANALYSYS {} + /** * Mark a function that executes in coroutine context * @@ -42,7 +70,8 @@ * .... * } */ -#define coroutine_fn + +#define coroutine_fn TAA_REQUIRES(_coroutine_fn) =20 typedef struct Coroutine Coroutine; =20 diff --git a/util/coroutine-sigaltstack.c b/util/coroutine-sigaltstack.c index f6fc49a0e5..05d1a378d1 100644 --- a/util/coroutine-sigaltstack.c +++ b/util/coroutine-sigaltstack.c @@ -98,7 +98,9 @@ static void coroutine_bootstrap(CoroutineSigAltStack *sel= f, Coroutine *co) } =20 while (true) { + co_role_acquire(_coroutine_fn); co->entry(co->entry_arg); + co_role_release(_coroutine_fn); qemu_coroutine_switch(co, co->caller, COROUTINE_TERMINATE); } } diff --git a/util/coroutine-ucontext.c b/util/coroutine-ucontext.c index 6621f3f692..010fbaedf1 100644 --- a/util/coroutine-ucontext.c +++ b/util/coroutine-ucontext.c @@ -76,7 +76,9 @@ static void coroutine_trampoline(int i0, int i1) } =20 while (true) { + co_role_acquire(_coroutine_fn); co->entry(co->entry_arg); + co_role_release(_coroutine_fn); qemu_coroutine_switch(co, co->caller, COROUTINE_TERMINATE); } } diff --git a/util/coroutine-win32.c b/util/coroutine-win32.c index de6bd4fd3e..75a3bed543 100644 --- a/util/coroutine-win32.c +++ b/util/coroutine-win32.c @@ -64,7 +64,9 @@ static void CALLBACK coroutine_trampoline(void *co_) Coroutine *co =3D co_; =20 while (true) { + co_role_acquire(_coroutine_fn); co->entry(co->entry_arg); + co_role_release(_coroutine_fn); qemu_coroutine_switch(co, co->caller, COROUTINE_TERMINATE); } } diff --git a/util/qemu-coroutine.c b/util/qemu-coroutine.c index d6095c1d5a..efa0f20e69 100644 --- a/util/qemu-coroutine.c +++ b/util/qemu-coroutine.c @@ -25,6 +25,8 @@ enum { POOL_BATCH_SIZE =3D 64, }; =20 +coroutine_role _coroutine_fn; + /** Free list to speed up creation */ static QSLIST_HEAD(, Coroutine) release_pool =3D QSLIST_HEAD_INITIALIZER(p= ool); static unsigned int release_pool_size; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 14992059671206.239328740929977; Tue, 4 Jul 2017 15:06:07 -0700 (PDT) Received: from localhost ([::1]:43115 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxM-0008R0-5J for importer@patchew.org; Tue, 04 Jul 2017 18:06:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48268) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVvb-0007EB-Ln for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVva-0008D4-IB for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40066) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVvV-0008AC-HC; Tue, 04 Jul 2017 18:04:09 -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 3B66580464; Tue, 4 Jul 2017 22:04:08 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7EB376EC61; Tue, 4 Jul 2017 22:04:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3B66580464 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3B66580464 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:13 +0200 Message-Id: <20170704220346.29244-3-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 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.28]); Tue, 04 Jul 2017 22:04:08 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 02/35] WIP: coroutine: manually tag the fast-paths 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 , "open list:Block layer core" , Juan Quintela , Hitoshi Mitake , Jeff Cody , "Dr. David Alan Gilbert" , Max Reitz , Alberto Garcia , "open list:Sheepdog" , Stefan Hajnoczi , Liu Yuan , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Some functions are both regular and coroutine. They may call coroutine functions in some cases, if it is known to be running in a coroutine. Signed-off-by: Marc-Andr=C3=A9 Lureau --- block.c | 2 ++ block/block-backend.c | 2 ++ block/io.c | 16 +++++++++++++++- block/sheepdog.c | 2 ++ block/throttle-groups.c | 10 ++++++++-- migration/rdma.c | 2 ++ 6 files changed, 31 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index 694396281b..b08c006da4 100644 --- a/block.c +++ b/block.c @@ -443,7 +443,9 @@ int bdrv_create(BlockDriver *drv, const char* filename, =20 if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ + co_role_acquire(_coroutine_fn); bdrv_create_co_entry(&cco); + co_role_release(_coroutine_fn); } else { co =3D qemu_coroutine_create(bdrv_create_co_entry, &cco); qemu_coroutine_enter(co); diff --git a/block/block-backend.c b/block/block-backend.c index 0df3457a09..56fc0a4d1e 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1072,7 +1072,9 @@ static int blk_prw(BlockBackend *blk, int64_t offset,= uint8_t *buf, =20 if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ + co_role_acquire(_coroutine_fn); co_entry(&rwco); + co_role_release(_coroutine_fn); } else { Coroutine *co =3D qemu_coroutine_create(co_entry, &rwco); bdrv_coroutine_enter(blk_bs(blk), co); diff --git a/block/io.c b/block/io.c index 2de7c77983..14b88c8609 100644 --- a/block/io.c +++ b/block/io.c @@ -229,7 +229,9 @@ static void coroutine_fn bdrv_co_yield_to_drain(BlockDr= iverState *bs) void bdrv_drained_begin(BlockDriverState *bs) { if (qemu_in_coroutine()) { + co_role_acquire(_coroutine_fn); bdrv_co_yield_to_drain(bs); + co_role_release(_coroutine_fn); return; } =20 @@ -616,7 +618,9 @@ static int bdrv_prwv_co(BdrvChild *child, int64_t offse= t, =20 if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ + co_role_acquire(_coroutine_fn); bdrv_rw_co_entry(&rwco); + co_role_release(_coroutine_fn); } else { co =3D qemu_coroutine_create(bdrv_rw_co_entry, &rwco); bdrv_coroutine_enter(child->bs, co); @@ -1901,7 +1905,9 @@ int64_t bdrv_get_block_status_above(BlockDriverState = *bs, =20 if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ + co_role_acquire(_coroutine_fn); bdrv_get_block_status_above_co_entry(&data); + co_role_release(_coroutine_fn); } else { co =3D qemu_coroutine_create(bdrv_get_block_status_above_co_entry, &data); @@ -2027,7 +2033,11 @@ bdrv_rw_vmstate(BlockDriverState *bs, QEMUIOVector *= qiov, int64_t pos, bool is_read) { if (qemu_in_coroutine()) { - return bdrv_co_rw_vmstate(bs, qiov, pos, is_read); + int ret; + co_role_acquire(_coroutine_fn); + ret =3D bdrv_co_rw_vmstate(bs, qiov, pos, is_read); + co_role_release(_coroutine_fn); + return ret; } else { BdrvVmstateCo data =3D { .bs =3D bs, @@ -2259,7 +2269,9 @@ int bdrv_flush(BlockDriverState *bs) =20 if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ + co_role_acquire(_coroutine_fn); bdrv_flush_co_entry(&flush_co); + co_role_release(_coroutine_fn); } else { co =3D qemu_coroutine_create(bdrv_flush_co_entry, &flush_co); bdrv_coroutine_enter(bs, co); @@ -2406,7 +2418,9 @@ int bdrv_pdiscard(BlockDriverState *bs, int64_t offse= t, int bytes) =20 if (qemu_in_coroutine()) { /* Fast-path if already in coroutine context */ + co_role_acquire(_coroutine_fn); bdrv_pdiscard_co_entry(&rwco); + co_role_release(_coroutine_fn); } else { co =3D qemu_coroutine_create(bdrv_pdiscard_co_entry, &rwco); bdrv_coroutine_enter(bs, co); diff --git a/block/sheepdog.c b/block/sheepdog.c index 08d7b11e9d..83bc43dde4 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -726,7 +726,9 @@ static int do_req(int sockfd, BlockDriverState *bs, She= epdogReq *hdr, }; =20 if (qemu_in_coroutine()) { + co_role_acquire(_coroutine_fn); do_co_req(&srco); + co_role_release(_coroutine_fn); } else { co =3D qemu_coroutine_create(do_co_req, &srco); if (bs) { diff --git a/block/throttle-groups.c b/block/throttle-groups.c index da2b490c38..8778f78965 100644 --- a/block/throttle-groups.c +++ b/block/throttle-groups.c @@ -304,9 +304,15 @@ static void schedule_next_request(BlockBackend *blk, b= ool is_write) =20 /* If it doesn't have to wait, queue it for immediate execution */ if (!must_wait) { + bool handled =3D false; + + if (qemu_in_coroutine()) { + co_role_acquire(_coroutine_fn); + handled =3D throttle_group_co_restart_queue(blk, is_write); + co_role_release(_coroutine_fn); + } /* Give preference to requests from the current blk */ - if (qemu_in_coroutine() && - throttle_group_co_restart_queue(blk, is_write)) { + if (handled) { token =3D blk; } else { ThrottleTimers *tt =3D &blk_get_public(token)->throttle_timers; diff --git a/migration/rdma.c b/migration/rdma.c index c6bc607a03..8c00d4d74c 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -1518,7 +1518,9 @@ static int qemu_rdma_block_for_wrid(RDMAContext *rdma= , int wrid_requested, * so don't yield unless we know we're running inside of a corouti= ne. */ if (rdma->migration_started_on_destination) { + co_role_acquire(_coroutine_fn); yield_until_fd_readable(rdma->comp_channel->fd); + co_role_release(_coroutine_fn); } =20 if (ibv_get_cq_event(rdma->comp_channel, &cq, &cq_ctx)) { --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206119447597.0170443416092; Tue, 4 Jul 2017 15:08:39 -0700 (PDT) Received: from localhost ([::1]:43123 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVzo-0002FB-TN for importer@patchew.org; Tue, 04 Jul 2017 18:08:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVvd-0007EC-2Z for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVvc-0008E3-3I for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54226) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVvb-0008DS-TG for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:16 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D81C581224 for ; Tue, 4 Jul 2017 22:04:14 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id E70D05D722; Tue, 4 Jul 2017 22:04:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D81C581224 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=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D81C581224 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:14 +0200 Message-Id: <20170704220346.29244-4-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 04 Jul 2017 22:04:15 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 03/35] test-coroutine: fix coroutine attribute 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" CC tests/test-coroutine.o qemu/tests/test-coroutine.c:390:5: warning: calling function 'qemu_coroutin= e_yield' requires holding role '_coroutine_fn' exclusively [-Wthread-safety= -analysis] qemu_coroutine_yield(); ^ qemu/tests/test-coroutine.c:403:14: warning: Unmached attributes [-Wthread-= safety-analysis] co =3D qemu_coroutine_create(perf_cost_func, &i); ^ 2 warnings generated. Signed-off-by: Marc-Andr=C3=A9 Lureau --- tests/test-coroutine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c index abd97c23c1..f14277af83 100644 --- a/tests/test-coroutine.c +++ b/tests/test-coroutine.c @@ -385,7 +385,7 @@ static void perf_baseline(void) maxcycles, duration); } =20 -static __attribute__((noinline)) void perf_cost_func(void *opaque) +static __attribute__((noinline)) void coroutine_fn perf_cost_func(void *op= aque) { qemu_coroutine_yield(); } --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206264128853.3358685229164; Tue, 4 Jul 2017 15:11:04 -0700 (PDT) Received: from localhost ([::1]:43143 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW2A-000534-R8 for importer@patchew.org; Tue, 04 Jul 2017 18:11:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVvl-0007KW-TT for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVvi-0008H8-Om for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36216) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVvi-0008Ge-Iy for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:22 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 876434DB15 for ; Tue, 4 Jul 2017 22:04:21 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 939196928C; Tue, 4 Jul 2017 22:04:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 876434DB15 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 876434DB15 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:15 +0200 Message-Id: <20170704220346.29244-5-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jul 2017 22:04:21 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 04/35] coroutine: remove coroutine_fn from qemu_coroutine_self() 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The function may be safely called from non-coroutine context. Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/qemu/coroutine.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index 35ff394f51..ec55fe295c 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -121,7 +121,7 @@ void coroutine_fn qemu_coroutine_yield(void); /** * Get the currently executing coroutine */ -Coroutine *coroutine_fn qemu_coroutine_self(void); +Coroutine *qemu_coroutine_self(void); =20 /** * Return whether or not currently inside a coroutine --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206415336286.79263224504655; Tue, 4 Jul 2017 15:13:35 -0700 (PDT) Received: from localhost ([::1]:43155 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW4c-00078X-3S for importer@patchew.org; Tue, 04 Jul 2017 18:13:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVvq-0007Oo-Sl for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVvq-0008Kc-0P for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37602) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVvp-0008KF-Q5 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:29 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D08F980F94 for ; Tue, 4 Jul 2017 22:04:28 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF3B36292C; Tue, 4 Jul 2017 22:04:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D08F980F94 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D08F980F94 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:16 +0200 Message-Id: <20170704220346.29244-6-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 22:04:28 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 05/35] coroutine: remove coroutine_fn from qemu_co_queue_run_restart() 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The function can be invoked from non-coroutine context. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- include/qemu/coroutine_int.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/coroutine_int.h b/include/qemu/coroutine_int.h index cb98892bba..e9fc72c5b0 100644 --- a/include/qemu/coroutine_int.h +++ b/include/qemu/coroutine_int.h @@ -61,6 +61,6 @@ Coroutine *qemu_coroutine_new(void); void qemu_coroutine_delete(Coroutine *co); CoroutineAction qemu_coroutine_switch(Coroutine *from, Coroutine *to, CoroutineAction action); -void coroutine_fn qemu_co_queue_run_restart(Coroutine *co); +void qemu_co_queue_run_restart(Coroutine *co); =20 #endif --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499205992660916.412626038682; Tue, 4 Jul 2017 15:06:32 -0700 (PDT) Received: from localhost ([::1]:43117 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxn-0000P0-0e for importer@patchew.org; Tue, 04 Jul 2017 18:06:31 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVvx-0007Tf-TH for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVvw-0008O5-NT for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54440) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVvw-0008Ne-Dt for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:36 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6800E8125F for ; Tue, 4 Jul 2017 22:04:35 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21AB97053C; Tue, 4 Jul 2017 22:04:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6800E8125F 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=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6800E8125F From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:17 +0200 Message-Id: <20170704220346.29244-7-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 04 Jul 2017 22:04:35 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 06/35] coroutine: mark CoRwLock coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Stefan Hajnoczi Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" CC util/qemu-coroutine-lock.o /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:371:5: warning: calling f= unction 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] qemu_co_mutex_lock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:371:5: warning: calling f= unction 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:374:9: warning: calling f= unction 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] qemu_co_queue_wait(&lock->queue, &lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:374:9: warning: calling f= unction 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:377:5: warning: calling f= unction 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclus= ively [-Wthread-safety-analysis] qemu_co_mutex_unlock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:377:5: warning: calling f= unction 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclus= ively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:390:9: warning: calling f= unction 'qemu_co_queue_restart_all' requires holding role '_coroutine_fn' e= xclusively [-Wthread-safety-analysis] qemu_co_queue_restart_all(&lock->queue); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:390:9: warning: calling f= unction 'qemu_co_queue_restart_all' requires holding role '_coroutine_fn' e= xclusively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:394:9: warning: calling f= unction 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] qemu_co_mutex_lock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:394:9: warning: calling f= unction 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:399:13: warning: calling = function 'qemu_co_queue_next' requires holding role '_coroutine_fn' exclusi= vely [-Wthread-safety-analysis] qemu_co_queue_next(&lock->queue); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:399:13: warning: calling = function 'qemu_co_queue_next' requires holding role '_coroutine_fn' exclusi= vely [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:402:5: warning: calling f= unction 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclus= ively [-Wthread-safety-analysis] qemu_co_mutex_unlock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:402:5: warning: calling f= unction 'qemu_co_mutex_unlock' requires holding role '_coroutine_fn' exclus= ively [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:407:5: warning: calling f= unction 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] qemu_co_mutex_lock(&lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:407:5: warning: calling f= unction 'qemu_co_mutex_lock' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:410:9: warning: calling f= unction 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] qemu_co_queue_wait(&lock->queue, &lock->mutex); ^ /home/elmarco/src/qemu/util/qemu-coroutine-lock.c:410:9: warning: calling f= unction 'qemu_co_queue_wait' requires holding role '_coroutine_fn' exclusiv= ely [-Wthread-safety-analysis] Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- include/qemu/coroutine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/coroutine.h b/include/qemu/coroutine.h index ec55fe295c..5698414c14 100644 --- a/include/qemu/coroutine.h +++ b/include/qemu/coroutine.h @@ -255,20 +255,20 @@ void qemu_co_rwlock_init(CoRwlock *lock); * of a parallel writer, control is transferred to the caller of the curre= nt * coroutine. */ -void qemu_co_rwlock_rdlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_rdlock(CoRwlock *lock); =20 /** * Write Locks the mutex. If the lock cannot be taken immediately because * of a parallel reader, control is transferred to the caller of the curre= nt * coroutine. */ -void qemu_co_rwlock_wrlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_wrlock(CoRwlock *lock); =20 /** * Unlocks the read/write lock and schedules the next coroutine that was * waiting for this lock to be run. */ -void qemu_co_rwlock_unlock(CoRwlock *lock); +void coroutine_fn qemu_co_rwlock_unlock(CoRwlock *lock); =20 /** * Yield the coroutine for a given duration --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206144535744.6962455070523; Tue, 4 Jul 2017 15:09:04 -0700 (PDT) Received: from localhost ([::1]:43125 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW0D-00030e-5f for importer@patchew.org; Tue, 04 Jul 2017 18:09:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48424) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVw5-0007ae-J1 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVw4-0008Sa-NU for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46518) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVw0-0008PY-8g; Tue, 04 Jul 2017 18:04:40 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 439CCC0587E4; Tue, 4 Jul 2017 22:04:39 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 62A3D6292C; Tue, 4 Jul 2017 22:04:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 439CCC0587E4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 439CCC0587E4 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:18 +0200 Message-Id: <20170704220346.29244-8-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:04:39 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 07/35] blockjob: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jeff Cody , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" /home/elmarco/src/qemu/blockjob.c:820:9: error: calling function 'qemu_coro= utine_yield' requires holding role '_coroutine_fn' exclusively [-Werror,-Wt= hread-safety-analysis] qemu_coroutine_yield(); ^ /home/elmarco/src/qemu/blockjob.c:824:5: error: calling function 'block_job= _pause_point' requires holding role '_coroutine_fn' exclusively [-Werror,-W= thread-safety-analysis] block_job_pause_point(job); ^ Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- include/block/blockjob_int.h | 4 ++-- blockjob.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index f13ad05c0d..a3bc01fd51 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -145,7 +145,7 @@ void *block_job_create(const char *job_id, const BlockJ= obDriver *driver, * Put the job to sleep (assuming that it wasn't canceled) for @ns * nanoseconds. Canceling the job will interrupt the wait immediately. */ -void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns); +void coroutine_fn block_job_sleep_ns(BlockJob *job, QEMUClockType type, in= t64_t ns); =20 /** * block_job_yield: @@ -153,7 +153,7 @@ void block_job_sleep_ns(BlockJob *job, QEMUClockType ty= pe, int64_t ns); * * Yield the block job coroutine. */ -void block_job_yield(BlockJob *job); +void coroutine_fn block_job_yield(BlockJob *job); =20 /** * block_job_pause_all: diff --git a/blockjob.c b/blockjob.c index 70a78188b7..96424323c1 100644 --- a/blockjob.c +++ b/blockjob.c @@ -788,7 +788,8 @@ bool block_job_is_cancelled(BlockJob *job) return job->cancelled; } =20 -void block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns) +void coroutine_fn +block_job_sleep_ns(BlockJob *job, QEMUClockType type, int64_t ns) { assert(job->busy); =20 @@ -806,7 +807,8 @@ void block_job_sleep_ns(BlockJob *job, QEMUClockType ty= pe, int64_t ns) block_job_pause_point(job); } =20 -void block_job_yield(BlockJob *job) +void coroutine_fn +block_job_yield(BlockJob *job) { assert(job->busy); =20 --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206246367449.9739115765266; Tue, 4 Jul 2017 15:10:46 -0700 (PDT) Received: from localhost ([::1]:43141 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW1s-0004pJ-PZ for importer@patchew.org; Tue, 04 Jul 2017 18:10:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVw8-0007dd-IR for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVw7-0008Us-NX for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46578) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVw5-0008SO-5w; Tue, 04 Jul 2017 18:04:45 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 278D6C0587D1; Tue, 4 Jul 2017 22:04:44 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id F07115D968; Tue, 4 Jul 2017 22:04:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 278D6C0587D1 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 278D6C0587D1 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:19 +0200 Message-Id: <20170704220346.29244-9-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:04:44 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 08/35] block: all bdrv_aio callbacks are coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/block/block_int.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 15fa602150..93eb2a9528 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -133,15 +133,15 @@ struct BlockDriver { void (*bdrv_refresh_filename)(BlockDriverState *bs, QDict *options); =20 /* aio */ - BlockAIOCB *(*bdrv_aio_readv)(BlockDriverState *bs, + BlockAIOCB * coroutine_fn (*bdrv_aio_readv)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque); - BlockAIOCB *(*bdrv_aio_writev)(BlockDriverState *bs, + BlockAIOCB * coroutine_fn (*bdrv_aio_writev)(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, void *opaque); - BlockAIOCB *(*bdrv_aio_flush)(BlockDriverState *bs, + BlockAIOCB * coroutine_fn (*bdrv_aio_flush)(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque); - BlockAIOCB *(*bdrv_aio_pdiscard)(BlockDriverState *bs, + BlockAIOCB * coroutine_fn (*bdrv_aio_pdiscard)(BlockDriverState *bs, int64_t offset, int bytes, BlockCompletionFunc *cb, void *opaque); =20 @@ -247,7 +247,7 @@ struct BlockDriver { void (*bdrv_lock_medium)(BlockDriverState *bs, bool locked); =20 /* to control generic scsi devices */ - BlockAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs, + BlockAIOCB * coroutine_fn (*bdrv_aio_ioctl)(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque); int coroutine_fn (*bdrv_co_ioctl)(BlockDriverState *bs, --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206051578214.35901490940694; Tue, 4 Jul 2017 15:07:31 -0700 (PDT) Received: from localhost ([::1]:43120 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVyk-0001Jk-AW for importer@patchew.org; Tue, 04 Jul 2017 18:07:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48505) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwD-0007ii-Rp for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwC-00006S-Kq for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:04:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32938) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVw8-0008Uk-6o; Tue, 04 Jul 2017 18:04:48 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3D645C04B303; Tue, 4 Jul 2017 22:04:47 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id D61B57053C; Tue, 4 Jul 2017 22:04:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3D645C04B303 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3D645C04B303 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:20 +0200 Message-Id: <20170704220346.29244-10-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 04 Jul 2017 22:04:47 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 09/35] block: bdrv_create() and bdrv_debug_event() are coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Called from coroutine. Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- include/block/block_int.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/block/block_int.h b/include/block/block_int.h index 93eb2a9528..a183c72b7c 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -126,7 +126,7 @@ struct BlockDriver { int (*bdrv_file_open)(BlockDriverState *bs, QDict *options, int flags, Error **errp); void (*bdrv_close)(BlockDriverState *bs); - int (*bdrv_create)(const char *filename, QemuOpts *opts, Error **errp); + int coroutine_fn (*bdrv_create)(const char *filename, QemuOpts *opts, = Error **errp); int (*bdrv_set_key)(BlockDriverState *bs, const char *key); int (*bdrv_make_empty)(BlockDriverState *bs); =20 @@ -267,7 +267,7 @@ struct BlockDriver { BlockDriverAmendStatusCB *status_cb, void *cb_opaque); =20 - void (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEvent event); + void coroutine_fn (*bdrv_debug_event)(BlockDriverState *bs, BlkdebugEv= ent event); =20 /* TODO Better pass a option string/QDict/QemuOpts to add any rule? */ int (*bdrv_debug_breakpoint)(BlockDriverState *bs, const char *event, --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 149920640625760.99167303570562; Tue, 4 Jul 2017 15:13:26 -0700 (PDT) Received: from localhost ([::1]:43152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW4S-000711-4A for importer@patchew.org; Tue, 04 Jul 2017 18:13:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48589) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwN-0007qf-Cy for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwK-0000Bb-3I for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36636) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwF-000095-ON; Tue, 04 Jul 2017 18:04:55 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B20FE110E; Tue, 4 Jul 2017 22:04:54 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id A848D60469; Tue, 4 Jul 2017 22:04:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B20FE110E Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B20FE110E From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:21 +0200 Message-Id: <20170704220346.29244-11-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jul 2017 22:04:54 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 10/35] vmdk: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Fam Zheng , "open list:VMDK" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- block/vmdk.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 55581b03fe..f8422e8971 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1334,7 +1334,8 @@ static int64_t coroutine_fn vmdk_co_get_block_status(= BlockDriverState *bs, return ret; } =20 -static int vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset, +static int coroutine_fn +vmdk_write_extent(VmdkExtent *extent, int64_t cluster_offset, int64_t offset_in_cluster, QEMUIOVector *qiov, uint64_t qiov_offset, uint64_t n_bytes, uint64_t offset) @@ -1406,7 +1407,8 @@ static int vmdk_write_extent(VmdkExtent *extent, int6= 4_t cluster_offset, return ret; } =20 -static int vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset, +static int coroutine_fn +vmdk_read_extent(VmdkExtent *extent, int64_t cluster_offset, int64_t offset_in_cluster, QEMUIOVector *qiov, int bytes) { @@ -1551,7 +1553,8 @@ fail: * * Returns: error code with 0 for success. */ -static int vmdk_pwritev(BlockDriverState *bs, uint64_t offset, +static int coroutine_fn +vmdk_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, bool zeroed, bool zero_dry_run) { @@ -1857,7 +1860,8 @@ static int filename_decompose(const char *filename, c= har *path, char *prefix, return VMDK_OK; } =20 -static int vmdk_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +vmdk_create(const char *filename, QemuOpts *opts, Error **errp) { int idx =3D 0; BlockBackend *new_blk =3D NULL; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206200103120.58421341359974; Tue, 4 Jul 2017 15:10:00 -0700 (PDT) Received: from localhost ([::1]:43129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW18-000444-OM for importer@patchew.org; Tue, 04 Jul 2017 18:09:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwQ-0007tM-A2 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwP-0000EM-41 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37894) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwM-0000CJ-5h; Tue, 04 Jul 2017 18:05:02 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2A72A80F8E; Tue, 4 Jul 2017 22:05:01 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38A5A6928C; Tue, 4 Jul 2017 22:04:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2A72A80F8E Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2A72A80F8E From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:22 +0200 Message-Id: <20170704220346.29244-12-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 22:05:01 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 11/35] qcow2: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:qcow" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- block/qcow2.h | 6 ++++-- block/qcow.c | 4 +++- block/qcow2-cluster.c | 11 +++++++---- block/qcow2.c | 15 ++++++++++----- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/block/qcow2.h b/block/qcow2.h index 87b15eb4aa..a32b47b7f6 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -550,14 +550,16 @@ int qcow2_encrypt_sectors(BDRVQcow2State *s, int64_t = sector_num, =20 int qcow2_get_cluster_offset(BlockDriverState *bs, uint64_t offset, unsigned int *bytes, uint64_t *cluster_offset= ); -int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, +int coroutine_fn +qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, unsigned int *bytes, uint64_t *host_offset, QCowL2Meta **m); uint64_t qcow2_alloc_compressed_cluster_offset(BlockDriverState *bs, uint64_t offset, int compressed_size); =20 -int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m); +int coroutine_fn +qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m); int qcow2_cluster_discard(BlockDriverState *bs, uint64_t offset, uint64_t bytes, enum qcow2_discard_type type, bool full_discard); diff --git a/block/qcow.c b/block/qcow.c index 7bd94dcd46..d84ae7fb74 100644 --- a/block/qcow.c +++ b/block/qcow.c @@ -796,7 +796,9 @@ static void qcow_close(BlockDriverState *bs) error_free(s->migration_blocker); } =20 -static int qcow_create(const char *filename, QemuOpts *opts, Error **errp) + +static int coroutine_fn +qcow_create(const char *filename, QemuOpts *opts, Error **errp) { int header_size, backing_filename_len, l1_size, shift, i; QCowHeader header; diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 3d341fd9cb..964d23aee8 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -761,7 +761,8 @@ uint64_t qcow2_alloc_compressed_cluster_offset(BlockDri= verState *bs, return cluster_offset; } =20 -static int perform_cow(BlockDriverState *bs, QCowL2Meta *m) +static int coroutine_fn +perform_cow(BlockDriverState *bs, QCowL2Meta *m) { BDRVQcow2State *s =3D bs->opaque; Qcow2COWRegion *start =3D &m->cow_start; @@ -890,7 +891,7 @@ fail: return ret; } =20 -int qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2Meta *m) +int coroutine_fn qcow2_alloc_cluster_link_l2(BlockDriverState *bs, QCowL2M= eta *m) { BDRVQcow2State *s =3D bs->opaque; int i, j =3D 0, l2_index, ret; @@ -1014,7 +1015,8 @@ out: * information on cluster allocation may be invalid now. The cal= ler * must start over anyway, so consider *cur_bytes undefined. */ -static int handle_dependencies(BlockDriverState *bs, uint64_t guest_offset, +static int coroutine_fn +handle_dependencies(BlockDriverState *bs, uint64_t guest_offset, uint64_t *cur_bytes, QCowL2Meta **m) { BDRVQcow2State *s =3D bs->opaque; @@ -1413,7 +1415,8 @@ fail: * * Return 0 on success and -errno in error cases */ -int qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, +int coroutine_fn +qcow2_alloc_cluster_offset(BlockDriverState *bs, uint64_t offset, unsigned int *bytes, uint64_t *host_offset, QCowL2Meta **m) { diff --git a/block/qcow2.c b/block/qcow2.c index 2f94f0326e..6ecf1489dc 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -2079,7 +2079,8 @@ static int qcow2_change_backing_file(BlockDriverState= *bs, return qcow2_update_header(bs); } =20 -static int preallocate(BlockDriverState *bs) +static int coroutine_fn +preallocate(BlockDriverState *bs) { uint64_t bytes; uint64_t offset; @@ -2140,7 +2141,8 @@ static int preallocate(BlockDriverState *bs) return 0; } =20 -static int qcow2_create2(const char *filename, int64_t total_size, +static int coroutine_fn +qcow2_create2(const char *filename, int64_t total_size, const char *backing_file, const char *backing_for= mat, int flags, size_t cluster_size, PreallocMode prea= lloc, QemuOpts *opts, int version, int refcount_order, @@ -2390,7 +2392,8 @@ out: return ret; } =20 -static int qcow2_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +qcow2_create(const char *filename, QemuOpts *opts, Error **errp) { char *backing_file =3D NULL; char *backing_fmt =3D NULL; @@ -3011,7 +3014,8 @@ static void dump_refcounts(BlockDriverState *bs) } #endif =20 -static int qcow2_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, +static int coroutine_fn +qcow2_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos) { BDRVQcow2State *s =3D bs->opaque; @@ -3021,7 +3025,8 @@ static int qcow2_save_vmstate(BlockDriverState *bs, Q= EMUIOVector *qiov, qiov->size, qiov, 0); } =20 -static int qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, +static int coroutine_fn +qcow2_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos) { BDRVQcow2State *s =3D bs->opaque; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206349809922.97378819737; Tue, 4 Jul 2017 15:12:29 -0700 (PDT) Received: from localhost ([::1]:43150 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW3Y-0006Dp-GA for importer@patchew.org; Tue, 04 Jul 2017 18:12:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwY-00085A-89 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwX-0000NQ-B0 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46822) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwS-0000Iz-T1; Tue, 04 Jul 2017 18:05:09 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8BBFC0587D1; Tue, 4 Jul 2017 22:05:07 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id BD5665D72E; Tue, 4 Jul 2017 22:05:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8BBFC0587D1 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D8BBFC0587D1 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:23 +0200 Message-Id: <20170704220346.29244-13-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:05:08 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 12/35] raw: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:raw" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- block/raw-format.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/raw-format.c b/block/raw-format.c index 0d185fe41b..402d3b9fba 100644 --- a/block/raw-format.c +++ b/block/raw-format.c @@ -361,7 +361,8 @@ static void raw_lock_medium(BlockDriverState *bs, bool = locked) bdrv_lock_medium(bs->file->bs, locked); } =20 -static int raw_co_ioctl(BlockDriverState *bs, unsigned long int req, void = *buf) +static int coroutine_fn +raw_co_ioctl(BlockDriverState *bs, unsigned long int req, void *buf) { BDRVRawState *s =3D bs->opaque; if (s->offset || s->has_size) { @@ -375,7 +376,8 @@ static int raw_has_zero_init(BlockDriverState *bs) return bdrv_has_zero_init(bs->file->bs); } =20 -static int raw_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +raw_create(const char *filename, QemuOpts *opts, Error **errp) { return bdrv_create_file(filename, opts, errp); } --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206562971181.51538214175855; Tue, 4 Jul 2017 15:16:02 -0700 (PDT) Received: from localhost ([::1]:43175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW6z-0001XJ-5L for importer@patchew.org; Tue, 04 Jul 2017 18:16:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwg-0008Av-J3 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwd-0000Rh-DM for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45654) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwZ-0000OQ-DC; Tue, 04 Jul 2017 18:05:15 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 621B47D0EF; Tue, 4 Jul 2017 22:05:14 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 74A8C7053C; Tue, 4 Jul 2017 22:05:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 621B47D0EF Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 621B47D0EF From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:24 +0200 Message-Id: <20170704220346.29244-14-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 04 Jul 2017 22:05:14 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 13/35] nbd: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Max Reitz , "open list:Block layer core" , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Eric Blake --- block/nbd-client.h | 10 +++++----- block/nbd-client.c | 24 ++++++++++++++++-------- block/nbd.c | 3 ++- nbd/server.c | 3 ++- 4 files changed, 25 insertions(+), 15 deletions(-) diff --git a/block/nbd-client.h b/block/nbd-client.h index 49636bc621..473d1f88fd 100644 --- a/block/nbd-client.h +++ b/block/nbd-client.h @@ -42,13 +42,13 @@ int nbd_client_init(BlockDriverState *bs, Error **errp); void nbd_client_close(BlockDriverState *bs); =20 -int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes= ); -int nbd_client_co_flush(BlockDriverState *bs); -int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset, +int coroutine_fn nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offs= et, int bytes); +int coroutine_fn nbd_client_co_flush(BlockDriverState *bs); +int coroutine_fn nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offs= et, uint64_t bytes, QEMUIOVector *qiov, int flags); -int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, +int coroutine_fn nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t= offset, int bytes, BdrvRequestFlags flags); -int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset, +int coroutine_fn nbd_client_co_preadv(BlockDriverState *bs, uint64_t offse= t, uint64_t bytes, QEMUIOVector *qiov, int flags); =20 void nbd_client_detach_aio_context(BlockDriverState *bs); diff --git a/block/nbd-client.c b/block/nbd-client.c index 02e928142e..63c0210c37 100644 --- a/block/nbd-client.c +++ b/block/nbd-client.c @@ -111,7 +111,8 @@ static coroutine_fn void nbd_read_reply_entry(void *opa= que) s->read_reply_co =3D NULL; } =20 -static int nbd_co_send_request(BlockDriverState *bs, +static int coroutine_fn +nbd_co_send_request(BlockDriverState *bs, NBDRequest *request, QEMUIOVector *qiov) { @@ -158,7 +159,8 @@ static int nbd_co_send_request(BlockDriverState *bs, return rc; } =20 -static void nbd_co_receive_reply(NBDClientSession *s, +static void coroutine_fn +nbd_co_receive_reply(NBDClientSession *s, NBDRequest *request, NBDReply *reply, QEMUIOVector *qiov) @@ -185,7 +187,8 @@ static void nbd_co_receive_reply(NBDClientSession *s, } } =20 -static void nbd_coroutine_end(BlockDriverState *bs, +static void coroutine_fn +nbd_coroutine_end(BlockDriverState *bs, NBDRequest *request) { NBDClientSession *s =3D nbd_get_client_session(bs); @@ -204,7 +207,8 @@ static void nbd_coroutine_end(BlockDriverState *bs, qemu_co_mutex_unlock(&s->send_mutex); } =20 -int nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset, +int coroutine_fn +nbd_client_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { NBDClientSession *client =3D nbd_get_client_session(bs); @@ -229,7 +233,8 @@ int nbd_client_co_preadv(BlockDriverState *bs, uint64_t= offset, return -reply.error; } =20 -int nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset, +int coroutine_fn +nbd_client_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { NBDClientSession *client =3D nbd_get_client_session(bs); @@ -258,7 +263,8 @@ int nbd_client_co_pwritev(BlockDriverState *bs, uint64_= t offset, return -reply.error; } =20 -int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, +int coroutine_fn +nbd_client_co_pwrite_zeroes(BlockDriverState *bs, int64_t offset, int bytes, BdrvRequestFlags flags) { ssize_t ret; @@ -292,7 +298,8 @@ int nbd_client_co_pwrite_zeroes(BlockDriverState *bs, i= nt64_t offset, return -reply.error; } =20 -int nbd_client_co_flush(BlockDriverState *bs) +int coroutine_fn +nbd_client_co_flush(BlockDriverState *bs) { NBDClientSession *client =3D nbd_get_client_session(bs); NBDRequest request =3D { .type =3D NBD_CMD_FLUSH }; @@ -316,7 +323,8 @@ int nbd_client_co_flush(BlockDriverState *bs) return -reply.error; } =20 -int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes) +int coroutine_fn +nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int bytes) { NBDClientSession *client =3D nbd_get_client_session(bs); NBDRequest request =3D { diff --git a/block/nbd.c b/block/nbd.c index d529305330..8689b27d7d 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -465,7 +465,8 @@ static int nbd_open(BlockDriverState *bs, QDict *option= s, int flags, return ret; } =20 -static int nbd_co_flush(BlockDriverState *bs) +static int coroutine_fn +nbd_co_flush(BlockDriverState *bs) { return nbd_client_co_flush(bs); } diff --git a/nbd/server.c b/nbd/server.c index 8a70c054a6..4112b4b184 100644 --- a/nbd/server.c +++ b/nbd/server.c @@ -960,7 +960,8 @@ void nbd_export_close_all(void) } } =20 -static int nbd_co_send_reply(NBDRequestData *req, NBDReply *reply, int len) +static int coroutine_fn +nbd_co_send_reply(NBDRequestData *req, NBDReply *reply, int len) { NBDClient *client =3D req->client; int ret; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206503539116.26564841018524; Tue, 4 Jul 2017 15:15:03 -0700 (PDT) Received: from localhost ([::1]:43167 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW62-0000eA-8Y for importer@patchew.org; Tue, 04 Jul 2017 18:15:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48757) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwg-0008B9-R7 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwg-0000TG-2B for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38090) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwf-0000Sm-SM for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:21 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D937B80F94 for ; Tue, 4 Jul 2017 22:05:20 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 288C66292C; Tue, 4 Jul 2017 22:05:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D937B80F94 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D937B80F94 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:25 +0200 Message-Id: <20170704220346.29244-15-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 22:05:21 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 14/35] migration: mark coroutine_fn 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Dr. David Alan Gilbert" , Juan Quintela Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Juan Quintela Reviewed-by: Stefan Hajnoczi --- migration/migration.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migration/migration.c b/migration/migration.c index 51ccd1a4c5..3370482637 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -303,7 +303,8 @@ static void process_incoming_migration_bh(void *opaque) migration_incoming_state_destroy(); } =20 -static void process_incoming_migration_co(void *opaque) +static void coroutine_fn +process_incoming_migration_co(void *opaque) { QEMUFile *f =3D opaque; MigrationIncomingState *mis =3D migration_incoming_get_current(); --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206656761685.1830834482845; Tue, 4 Jul 2017 15:17:36 -0700 (PDT) Received: from localhost ([::1]:43183 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW8U-0002nO-GB for importer@patchew.org; Tue, 04 Jul 2017 18:17:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48800) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwr-0008Ku-6L for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwq-0000av-9q for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40926) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwl-0000V1-Sv; Tue, 04 Jul 2017 18:05:28 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8FA88046F; Tue, 4 Jul 2017 22:05:26 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0C9C86928C; Tue, 4 Jul 2017 22:05:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8FA88046F Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D8FA88046F From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:26 +0200 Message-Id: <20170704220346.29244-16-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 04 Jul 2017 22:05:27 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 15/35] backup: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jeff Cody , "open list:Block Jobs" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Stefan Hajnoczi --- include/block/block_backup.h | 4 ++-- block/backup.c | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/include/block/block_backup.h b/include/block/block_backup.h index 8a759477a3..415cf8519d 100644 --- a/include/block/block_backup.h +++ b/include/block/block_backup.h @@ -27,12 +27,12 @@ typedef struct CowRequest { CoQueue wait_queue; /* coroutines blocked on this request */ } CowRequest; =20 -void backup_wait_for_overlapping_requests(BlockJob *job, int64_t sector_nu= m, +void coroutine_fn backup_wait_for_overlapping_requests(BlockJob *job, int6= 4_t sector_num, int nb_sectors); void backup_cow_request_begin(CowRequest *req, BlockJob *job, int64_t sector_num, int nb_sectors); -void backup_cow_request_end(CowRequest *req); +void coroutine_fn backup_cow_request_end(CowRequest *req); =20 void backup_do_checkpoint(BlockJob *job, Error **errp); =20 diff --git a/block/backup.c b/block/backup.c index 5387fbd84e..58ddd80b3f 100644 --- a/block/backup.c +++ b/block/backup.c @@ -84,7 +84,8 @@ static void cow_request_begin(CowRequest *req, BackupBloc= kJob *job, } =20 /* Forget about a completed request */ -static void cow_request_end(CowRequest *req) +static void coroutine_fn +cow_request_end(CowRequest *req) { QLIST_REMOVE(req, list); qemu_co_queue_restart_all(&req->wait_queue); @@ -275,7 +276,8 @@ void backup_do_checkpoint(BlockJob *job, Error **errp) bitmap_zero(backup_job->done_bitmap, len); } =20 -void backup_wait_for_overlapping_requests(BlockJob *job, int64_t sector_nu= m, +void coroutine_fn +backup_wait_for_overlapping_requests(BlockJob *job, int64_t sector_num, int nb_sectors) { BackupBlockJob *backup_job =3D container_of(job, BackupBlockJob, commo= n); @@ -304,7 +306,8 @@ void backup_cow_request_begin(CowRequest *req, BlockJob= *job, cow_request_begin(req, backup_job, start, end); } =20 -void backup_cow_request_end(CowRequest *req) +void coroutine_fn +backup_cow_request_end(CowRequest *req) { cow_request_end(req); } --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206811005775.9964985315588; Tue, 4 Jul 2017 15:20:11 -0700 (PDT) Received: from localhost ([::1]:43193 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWAz-0005Pz-LE for importer@patchew.org; Tue, 04 Jul 2017 18:20:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVwv-0008OJ-4M for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVwu-0000cd-2d for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38262) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwr-0000bE-KN; Tue, 04 Jul 2017 18:05:33 -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 9A74980F6B; Tue, 4 Jul 2017 22:05:32 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 14B1460F8C; Tue, 4 Jul 2017 22:05:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9A74980F6B Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 9A74980F6B From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:27 +0200 Message-Id: <20170704220346.29244-17-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 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.27]); Tue, 04 Jul 2017 22:05:32 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 16/35] crypto: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/crypto.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/crypto.c b/block/crypto.c index 10e5ddccaa..0e30a4ea06 100644 --- a/block/crypto.c +++ b/block/crypto.c @@ -568,7 +568,8 @@ static int block_crypto_open_luks(BlockDriverState *bs, bs, options, flags, errp); } =20 -static int block_crypto_create_luks(const char *filename, +static int coroutine_fn +block_crypto_create_luks(const char *filename, QemuOpts *opts, Error **errp) { --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206957161196.86420017576188; Tue, 4 Jul 2017 15:22:37 -0700 (PDT) Received: from localhost ([::1]:43213 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWDL-0007hR-4G for importer@patchew.org; Tue, 04 Jul 2017 18:22:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48879) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVx0-0008Sc-Ro for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVx0-0000f5-3L for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47218) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVwx-0000dm-UR; Tue, 04 Jul 2017 18:05:40 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E3EC9C0587D4; Tue, 4 Jul 2017 22:05:38 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 527EB60469; Tue, 4 Jul 2017 22:05:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E3EC9C0587D4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E3EC9C0587D4 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:28 +0200 Message-Id: <20170704220346.29244-18-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:05:39 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 17/35] curl: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jeff Cody , "open list:CURL" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 2a244e2439..d3719dc086 100644 --- a/block/curl.c +++ b/block/curl.c @@ -855,7 +855,8 @@ out_noclean: return -EINVAL; } =20 -static void curl_setup_preadv(BlockDriverState *bs, CURLAIOCB *acb) +static void coroutine_fn +curl_setup_preadv(BlockDriverState *bs, CURLAIOCB *acb) { CURLState *state; int running; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206726361563.10390525755; Tue, 4 Jul 2017 15:18:46 -0700 (PDT) Received: from localhost ([::1]:43186 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW9c-0003jG-Om for importer@patchew.org; Tue, 04 Jul 2017 18:18:44 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48920) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVx8-00007o-Ci for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVx7-0000hF-JV for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47304) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVx3-0000fq-8C; Tue, 04 Jul 2017 18:05:45 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3A22AC058EB2; Tue, 4 Jul 2017 22:05:44 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 938AE5D722; Tue, 4 Jul 2017 22:05:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3A22AC058EB2 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 3A22AC058EB2 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:29 +0200 Message-Id: <20170704220346.29244-19-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:05:44 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 18/35] gluster: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jeff Cody , "open list:GLUSTER" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/gluster.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/gluster.c b/block/gluster.c index addceed6eb..dea8ab43a5 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -965,7 +965,8 @@ static coroutine_fn int qemu_gluster_co_pwrite_zeroes(B= lockDriverState *bs, } #endif =20 -static int qemu_gluster_create(const char *filename, +static int coroutine_fn +qemu_gluster_create(const char *filename, QemuOpts *opts, Error **errp) { BlockdevOptionsGluster *gconf; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206597985807.9852247983173; Tue, 4 Jul 2017 15:16:37 -0700 (PDT) Received: from localhost ([::1]:43179 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW7Y-00021i-HY for importer@patchew.org; Tue, 04 Jul 2017 18:16:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxB-0000B8-QY for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxB-0000ic-11 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:05:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33714) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVx8-0000hS-UE; Tue, 04 Jul 2017 18:05:51 -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 E8C9BC04B303; Tue, 4 Jul 2017 22:05:49 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D5A5183CB; Tue, 4 Jul 2017 22:05:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com E8C9BC04B303 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com E8C9BC04B303 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:30 +0200 Message-Id: <20170704220346.29244-20-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 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.31]); Tue, 04 Jul 2017 22:05:50 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 19/35] nfs: mark coroutine_fn 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 , "open list:NFS" , Jeff Cody , Peter Lieven , Max Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/nfs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/nfs.c b/block/nfs.c index c3c5de0113..3f393a95a4 100644 --- a/block/nfs.c +++ b/block/nfs.c @@ -679,7 +679,8 @@ static QemuOptsList nfs_create_opts =3D { } }; =20 -static int nfs_file_create(const char *url, QemuOpts *opts, Error **errp) +static int coroutine_fn +nfs_file_create(const char *url, QemuOpts *opts, Error **errp) { int ret =3D 0; int64_t total_size =3D 0; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206880058754.2523019697342; Tue, 4 Jul 2017 15:21:20 -0700 (PDT) Received: from localhost ([::1]:43204 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWC6-0006bF-Ca for importer@patchew.org; Tue, 04 Jul 2017 18:21:18 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxJ-0000Jt-RK for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxI-0000oT-VA for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55274) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxD-0000ls-S0; Tue, 04 Jul 2017 18:05:56 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFDEB81224; Tue, 4 Jul 2017 22:05:54 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 99D356928C; Tue, 4 Jul 2017 22:05:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com CFDEB81224 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=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com CFDEB81224 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:31 +0200 Message-Id: <20170704220346.29244-21-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 04 Jul 2017 22:05:55 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 20/35] quorum: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Alberto Garcia , "open list:Quorum" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/quorum.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index 55ba916655..b086d70daa 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -264,7 +264,8 @@ static void quorum_report_bad_versions(BDRVQuorumState = *s, } } =20 -static void quorum_rewrite_entry(void *opaque) +static void coroutine_fn +quorum_rewrite_entry(void *opaque) { QuorumCo *co =3D opaque; QuorumAIOCB *acb =3D co->acb; @@ -282,7 +283,8 @@ static void quorum_rewrite_entry(void *opaque) } } =20 -static bool quorum_rewrite_bad_versions(QuorumAIOCB *acb, +static bool coroutine_fn +quorum_rewrite_bad_versions(QuorumAIOCB *acb, QuorumVoteValue *value) { QuorumVoteVersion *version; @@ -497,7 +499,8 @@ static int quorum_vote_error(QuorumAIOCB *acb) return ret; } =20 -static void quorum_vote(QuorumAIOCB *acb) +static void coroutine_fn +quorum_vote(QuorumAIOCB *acb) { bool quorum =3D true; int i, j, ret; @@ -577,7 +580,8 @@ free_exit: quorum_free_vote_list(&acb->votes); } =20 -static void read_quorum_children_entry(void *opaque) +static void coroutine_fn +read_quorum_children_entry(void *opaque) { QuorumCo *co =3D opaque; QuorumAIOCB *acb =3D co->acb; @@ -605,7 +609,7 @@ static void read_quorum_children_entry(void *opaque) } } =20 -static int read_quorum_children(QuorumAIOCB *acb) +static int coroutine_fn read_quorum_children(QuorumAIOCB *acb) { BDRVQuorumState *s =3D acb->bs->opaque; int i, ret; @@ -648,7 +652,8 @@ static int read_quorum_children(QuorumAIOCB *acb) return ret; } =20 -static int read_fifo_child(QuorumAIOCB *acb) +static int coroutine_fn +read_fifo_child(QuorumAIOCB *acb) { BDRVQuorumState *s =3D acb->bs->opaque; int n, ret; @@ -669,7 +674,8 @@ static int read_fifo_child(QuorumAIOCB *acb) return ret; } =20 -static int quorum_co_preadv(BlockDriverState *bs, uint64_t offset, +static int coroutine_fn +quorum_co_preadv(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { BDRVQuorumState *s =3D bs->opaque; @@ -689,7 +695,7 @@ static int quorum_co_preadv(BlockDriverState *bs, uint6= 4_t offset, return ret; } =20 -static void write_quorum_entry(void *opaque) +static void coroutine_fn write_quorum_entry(void *opaque) { QuorumCo *co =3D opaque; QuorumAIOCB *acb =3D co->acb; @@ -715,7 +721,8 @@ static void write_quorum_entry(void *opaque) } } =20 -static int quorum_co_pwritev(BlockDriverState *bs, uint64_t offset, +static int coroutine_fn +quorum_co_pwritev(BlockDriverState *bs, uint64_t offset, uint64_t bytes, QEMUIOVector *qiov, int flags) { BDRVQuorumState *s =3D bs->opaque; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206335985810.2183988670715; Tue, 4 Jul 2017 15:12:15 -0700 (PDT) Received: from localhost ([::1]:43148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW3K-00061F-NM for importer@patchew.org; Tue, 04 Jul 2017 18:12:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxL-0000LB-3N for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxK-0000p5-8d for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:03 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39328) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxI-0000nv-1W; Tue, 04 Jul 2017 18:06:00 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 14DCF4E4CA; Tue, 4 Jul 2017 22:05:59 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 911C75D722; Tue, 4 Jul 2017 22:05:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 14DCF4E4CA Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 14DCF4E4CA From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:32 +0200 Message-Id: <20170704220346.29244-22-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Tue, 04 Jul 2017 22:05:59 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 21/35] rbd: mark coroutine_fn 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 , Josh Durgin , "open list:RBD" , Jeff Cody , Max Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/rbd.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index 9da02cdceb..7b4d548cd2 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -348,7 +348,8 @@ static QemuOptsList runtime_opts =3D { }, }; =20 -static int qemu_rbd_create(const char *filename, QemuOpts *opts, Error **e= rrp) +static int coroutine_fn +qemu_rbd_create(const char *filename, QemuOpts *opts, Error **errp) { Error *local_err =3D NULL; int64_t bytes =3D 0; @@ -861,7 +862,8 @@ failed: return NULL; } =20 -static BlockAIOCB *qemu_rbd_aio_readv(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +qemu_rbd_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, @@ -873,7 +875,8 @@ static BlockAIOCB *qemu_rbd_aio_readv(BlockDriverState = *bs, RBD_AIO_READ); } =20 -static BlockAIOCB *qemu_rbd_aio_writev(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +qemu_rbd_aio_writev(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, @@ -886,7 +889,8 @@ static BlockAIOCB *qemu_rbd_aio_writev(BlockDriverState= *bs, } =20 #ifdef LIBRBD_SUPPORTS_AIO_FLUSH -static BlockAIOCB *qemu_rbd_aio_flush(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +qemu_rbd_aio_flush(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) { @@ -1063,7 +1067,8 @@ static int qemu_rbd_snap_list(BlockDriverState *bs, } =20 #ifdef LIBRBD_SUPPORTS_DISCARD -static BlockAIOCB *qemu_rbd_aio_pdiscard(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +qemu_rbd_aio_pdiscard(BlockDriverState *bs, int64_t offset, int bytes, BlockCompletionFunc *cb, --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 149920675442984.08803535617983; Tue, 4 Jul 2017 15:19:14 -0700 (PDT) Received: from localhost ([::1]:43191 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWA5-0004AZ-5g for importer@patchew.org; Tue, 04 Jul 2017 18:19:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49044) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxT-0000Se-0r for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxS-0000v8-5G for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33876) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxN-0000rS-GO; Tue, 04 Jul 2017 18:06:05 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82F47C04B303; Tue, 4 Jul 2017 22:06:04 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id F187970543; Tue, 4 Jul 2017 22:06:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 82F47C04B303 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 82F47C04B303 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:33 +0200 Message-Id: <20170704220346.29244-23-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 04 Jul 2017 22:06:04 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 22/35] sheepdog: mark coroutine_fn 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 , "open list:Sheepdog" , "open list:Sheepdog" , Hitoshi Mitake , Jeff Cody , Max Reitz , Liu Yuan , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/sheepdog.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c index 83bc43dde4..64ff275db9 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -481,7 +481,8 @@ static inline AIOReq *alloc_aio_req(BDRVSheepdogState *= s, SheepdogAIOCB *acb, return aio_req; } =20 -static void wait_for_overlapping_aiocb(BDRVSheepdogState *s, SheepdogAIOCB= *acb) +static void coroutine_fn +wait_for_overlapping_aiocb(BDRVSheepdogState *s, SheepdogAIOCB *acb) { SheepdogAIOCB *cb; =20 @@ -494,7 +495,8 @@ retry: } } =20 -static void sd_aio_setup(SheepdogAIOCB *acb, BDRVSheepdogState *s, +static void coroutine_fn +sd_aio_setup(SheepdogAIOCB *acb, BDRVSheepdogState *s, QEMUIOVector *qiov, int64_t sector_num, int nb_se= ctors, int type) { @@ -1954,7 +1956,8 @@ static int parse_block_size_shift(BDRVSheepdogState *= s, QemuOpts *opt) return 0; } =20 -static int sd_create(const char *filename, QemuOpts *opts, +static int coroutine_fn +sd_create(const char *filename, QemuOpts *opts, Error **errp) { Error *err =3D NULL; @@ -2431,7 +2434,8 @@ static void coroutine_fn sd_co_rw_vector(SheepdogAIOC= B *acb) } } =20 -static void sd_aio_complete(SheepdogAIOCB *acb) +static void coroutine_fn +sd_aio_complete(SheepdogAIOCB *acb) { if (acb->aiocb_type =3D=3D AIOCB_FLUSH_CACHE) { return; @@ -2905,7 +2909,8 @@ cleanup: return ret; } =20 -static int sd_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, +static int coroutine_fn +sd_save_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos) { BDRVSheepdogState *s =3D bs->opaque; @@ -2920,7 +2925,8 @@ static int sd_save_vmstate(BlockDriverState *bs, QEMU= IOVector *qiov, return ret; } =20 -static int sd_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, +static int coroutine_fn +sd_load_vmstate(BlockDriverState *bs, QEMUIOVector *qiov, int64_t pos) { BDRVSheepdogState *s =3D bs->opaque; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207024394837.7738819569122; Tue, 4 Jul 2017 15:23:44 -0700 (PDT) Received: from localhost ([::1]:43220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWER-0000Ft-7p for importer@patchew.org; Tue, 04 Jul 2017 18:23:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxV-0000Uh-6X for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxU-0000wA-DB for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38654) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxS-0000uJ-4l; Tue, 04 Jul 2017 18:06:10 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 307C9811AC; Tue, 4 Jul 2017 22:06:09 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id C58BF6928C; Tue, 4 Jul 2017 22:06:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 307C9811AC Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 307C9811AC From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:34 +0200 Message-Id: <20170704220346.29244-24-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 22:06:09 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 23/35] ssh: mark coroutine_fn 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 , "open list:SSH" , Jeff Cody , "Richard W.M. Jones" , Max Reitz , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/ssh.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index 52964416da..03a8ebe6f7 100644 --- a/block/ssh.c +++ b/block/ssh.c @@ -813,7 +813,8 @@ static QemuOptsList ssh_create_opts =3D { } }; =20 -static int ssh_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +ssh_create(const char *filename, QemuOpts *opts, Error **errp) { int r, ret; int64_t total_size =3D 0; @@ -1029,7 +1030,8 @@ static coroutine_fn int ssh_co_readv(BlockDriverState= *bs, return ret; } =20 -static int ssh_write(BDRVSSHState *s, BlockDriverState *bs, +static int coroutine_fn +ssh_write(BDRVSSHState *s, BlockDriverState *bs, int64_t offset, size_t size, QEMUIOVector *qiov) { --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 149920649994647.959276494755386; Tue, 4 Jul 2017 15:14:59 -0700 (PDT) Received: from localhost ([::1]:43165 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW5y-0000a2-Cw for importer@patchew.org; Tue, 04 Jul 2017 18:14:58 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49116) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxd-0000bU-QJ for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxc-00014Z-T9 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33992) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxa-00010d-U6; Tue, 04 Jul 2017 18:06:19 -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 F207DC04B948; Tue, 4 Jul 2017 22:06:17 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4FF3C183CB; Tue, 4 Jul 2017 22:06:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F207DC04B948 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F207DC04B948 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:35 +0200 Message-Id: <20170704220346.29244-25-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 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.31]); Tue, 04 Jul 2017 22:06:18 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 24/35] null: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Fam Zheng , "open list:Null Block Driver" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/null.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/block/null.c b/block/null.c index 876f90965b..4c8afe16d7 100644 --- a/block/null.c +++ b/block/null.c @@ -167,7 +167,8 @@ static inline BlockAIOCB *null_aio_common(BlockDriverSt= ate *bs, return &acb->common; } =20 -static BlockAIOCB *null_aio_readv(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +null_aio_readv(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, @@ -182,7 +183,8 @@ static BlockAIOCB *null_aio_readv(BlockDriverState *bs, return null_aio_common(bs, cb, opaque); } =20 -static BlockAIOCB *null_aio_writev(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +null_aio_writev(BlockDriverState *bs, int64_t sector_num, QEMUIOVector *qiov, int nb_sectors, BlockCompletionFunc *cb, @@ -191,7 +193,8 @@ static BlockAIOCB *null_aio_writev(BlockDriverState *bs, return null_aio_common(bs, cb, opaque); } =20 -static BlockAIOCB *null_aio_flush(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +null_aio_flush(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) { --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207144458618.1393693955695; Tue, 4 Jul 2017 15:25:44 -0700 (PDT) Received: from localhost ([::1]:43234 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWGN-0002mY-6m for importer@patchew.org; Tue, 04 Jul 2017 18:25:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxj-0000gd-HI for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxi-000173-N0 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34050) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxe-00015j-CG; Tue, 04 Jul 2017 18:06:22 -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 646B8C04B939; Tue, 4 Jul 2017 22:06:21 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6AD1B6EC61; Tue, 4 Jul 2017 22:06:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 646B8C04B939 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 646B8C04B939 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:36 +0200 Message-Id: <20170704220346.29244-26-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 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.31]); Tue, 04 Jul 2017 22:06:21 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 25/35] mirror: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jeff Cody , "open list:Block Jobs" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/mirror.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 68744a17e8..2f0a9946d9 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -224,7 +224,8 @@ static int mirror_cow_align(MirrorBlockJob *s, return ret; } =20 -static inline void mirror_wait_for_io(MirrorBlockJob *s) +static inline void coroutine_fn +mirror_wait_for_io(MirrorBlockJob *s) { assert(!s->waiting_for_io); s->waiting_for_io =3D true; @@ -239,7 +240,8 @@ static inline void mirror_wait_for_io(MirrorBlockJob *s) * (new_end - sector_num) if tail is rounded up or down due to * alignment or buffer limit. */ -static int mirror_do_read(MirrorBlockJob *s, int64_t sector_num, +static int coroutine_fn +mirror_do_read(MirrorBlockJob *s, int64_t sector_num, int nb_sectors) { BlockBackend *source =3D s->common.blk; @@ -490,7 +492,8 @@ static void mirror_free_init(MirrorBlockJob *s) * mirror_resume() because mirror_run() will begin iterating again * when the job is resumed. */ -static void mirror_wait_for_all_io(MirrorBlockJob *s) +static void coroutine_fn +mirror_wait_for_all_io(MirrorBlockJob *s) { while (s->in_flight > 0) { mirror_wait_for_io(s); @@ -605,7 +608,8 @@ static void mirror_exit(BlockJob *job, void *opaque) bdrv_unref(src); } =20 -static void mirror_throttle(MirrorBlockJob *s) +static void coroutine_fn +mirror_throttle(MirrorBlockJob *s) { int64_t now =3D qemu_clock_get_ns(QEMU_CLOCK_REALTIME); =20 @@ -984,7 +988,8 @@ static void mirror_complete(BlockJob *job, Error **errp) block_job_enter(&s->common); } =20 -static void mirror_pause(BlockJob *job) +static void coroutine_fn +mirror_pause(BlockJob *job) { MirrorBlockJob *s =3D container_of(job, MirrorBlockJob, common); =20 --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207243787265.8952288959323; Tue, 4 Jul 2017 15:27:23 -0700 (PDT) Received: from localhost ([::1]:43243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWHy-00044I-A7 for importer@patchew.org; Tue, 04 Jul 2017 18:27:22 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxm-0000ix-3k for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxl-00018F-At for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55632) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxj-000177-Cz; Tue, 04 Jul 2017 18:06:27 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5D51281226; Tue, 4 Jul 2017 22:06:26 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21AC17053C; Tue, 4 Jul 2017 22:06:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5D51281226 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=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5D51281226 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:37 +0200 Message-Id: <20170704220346.29244-27-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Tue, 04 Jul 2017 22:06:26 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 26/35] iscsi: mark coroutine_fn 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 , "open list:iSCSI" , Peter Lieven , Max Reitz , Ronnie Sahlberg , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/iscsi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 54067e2620..e16311cb4a 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1005,7 +1005,8 @@ static void iscsi_ioctl_handle_emulated(IscsiAIOCB *a= cb, int req, void *buf) qemu_bh_schedule(acb->bh); } =20 -static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +iscsi_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque) { @@ -2107,7 +2108,8 @@ static int iscsi_truncate(BlockDriverState *bs, int64= _t offset, Error **errp) return 0; } =20 -static int iscsi_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +iscsi_create(const char *filename, QemuOpts *opts, Error **errp) { int ret =3D 0; int64_t total_size =3D 0; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206924201413.6280386358145; Tue, 4 Jul 2017 15:22:04 -0700 (PDT) Received: from localhost ([::1]:43209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWCp-0007Dn-09 for importer@patchew.org; Tue, 04 Jul 2017 18:22:03 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxu-0000qR-5e for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxt-0001EW-9t for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47806) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxo-00019E-OF; Tue, 04 Jul 2017 18:06:32 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BB70BC0587D4; Tue, 4 Jul 2017 22:06:31 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 309336928C; Tue, 4 Jul 2017 22:06:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BB70BC0587D4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BB70BC0587D4 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:38 +0200 Message-Id: <20170704220346.29244-28-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:06:31 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 27/35] file-posix: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:raw" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/file-posix.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 3927fabf06..adafbbb6a0 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -1483,7 +1483,8 @@ static int aio_worker(void *arg) return ret; } =20 -static int paio_submit_co(BlockDriverState *bs, int fd, +static int coroutine_fn +paio_submit_co(BlockDriverState *bs, int fd, int64_t offset, QEMUIOVector *qiov, int bytes, int type) { @@ -1599,7 +1600,8 @@ static void raw_aio_unplug(BlockDriverState *bs) #endif } =20 -static BlockAIOCB *raw_aio_flush(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +raw_aio_flush(BlockDriverState *bs, BlockCompletionFunc *cb, void *opaque) { BDRVRawState *s =3D bs->opaque; @@ -1835,7 +1837,8 @@ static int64_t raw_get_allocated_file_size(BlockDrive= rState *bs) return (int64_t)st.st_blocks * 512; } =20 -static int raw_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +raw_create(const char *filename, QemuOpts *opts, Error **errp) { int fd; int result =3D 0; @@ -2526,7 +2529,8 @@ hdev_open_Mac_error: =20 #if defined(__linux__) =20 -static BlockAIOCB *hdev_aio_ioctl(BlockDriverState *bs, +static BlockAIOCB * coroutine_fn +hdev_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque) { @@ -2592,7 +2596,8 @@ static coroutine_fn int hdev_co_pwrite_zeroes(BlockDr= iverState *bs, return -ENOTSUP; } =20 -static int hdev_create(const char *filename, QemuOpts *opts, +static int coroutine_fn +hdev_create(const char *filename, QemuOpts *opts, Error **errp) { int fd; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 14992073376575.305720135311617; Tue, 4 Jul 2017 15:28:57 -0700 (PDT) Received: from localhost ([::1]:43248 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWJU-00057G-EN for importer@patchew.org; Tue, 04 Jul 2017 18:28:56 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVxt-0000pz-LF for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVxs-0001Dp-NZ for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34170) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVxs-0001Ch-HR for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 96DCDC04B939; Tue, 4 Jul 2017 22:06:35 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 693796928C; Tue, 4 Jul 2017 22:06:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 96DCDC04B939 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 96DCDC04B939 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:39 +0200 Message-Id: <20170704220346.29244-29-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 04 Jul 2017 22:06:35 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 28/35] 9p: mark coroutine_fn 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: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "Aneesh Kumar K.V" , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Acked-by: Greg Kurz --- hw/9pfs/9p.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/hw/9pfs/9p.h b/hw/9pfs/9p.h index d1cfeaf10e..935a6c9a3c 100644 --- a/hw/9pfs/9p.h +++ b/hw/9pfs/9p.h @@ -312,21 +312,24 @@ typedef struct V9fsGetlock extern int open_fd_hw; extern int total_open_fd; =20 -static inline void v9fs_path_write_lock(V9fsState *s) +static inline void coroutine_fn +v9fs_path_write_lock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) { qemu_co_rwlock_wrlock(&s->rename_lock); } } =20 -static inline void v9fs_path_read_lock(V9fsState *s) +static inline void coroutine_fn +v9fs_path_read_lock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) { qemu_co_rwlock_rdlock(&s->rename_lock); } } =20 -static inline void v9fs_path_unlock(V9fsState *s) +static inline void coroutine_fn +v9fs_path_unlock(V9fsState *s) { if (s->ctx.export_flags & V9FS_PATHNAME_FSCONTEXT) { qemu_co_rwlock_unlock(&s->rename_lock); --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206663733114.9173638297159; Tue, 4 Jul 2017 15:17:43 -0700 (PDT) Received: from localhost ([::1]:43184 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSW8c-0002rh-8h for importer@patchew.org; Tue, 04 Jul 2017 18:17:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49305) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVy7-00011j-2u for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVy6-0001Lk-1m for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54466) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVy1-0001Ie-9P; Tue, 04 Jul 2017 18:06:45 -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 46E073B721; Tue, 4 Jul 2017 22:06:44 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id E736F183CB; Tue, 4 Jul 2017 22:06:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 46E073B721 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 46E073B721 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:40 +0200 Message-Id: <20170704220346.29244-30-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 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.30]); Tue, 04 Jul 2017 22:06:44 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 29/35] block: mark coroutine_fn 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 , "open list:blkdebug" , Max Reitz , Stefan Hajnoczi , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/blkdebug.c | 15 ++++++++++----- block/blkverify.c | 3 ++- block/io.c | 9 ++++++--- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index a1b24b9b0d..d55e2e69c8 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -483,7 +483,8 @@ out: return ret; } =20 -static int rule_check(BlockDriverState *bs, uint64_t offset, uint64_t byte= s) +static int coroutine_fn +rule_check(BlockDriverState *bs, uint64_t offset, uint64_t bytes) { BDRVBlkdebugState *s =3D bs->opaque; BlkdebugRule *rule =3D NULL; @@ -563,7 +564,8 @@ blkdebug_co_pwritev(BlockDriverState *bs, uint64_t offs= et, uint64_t bytes, return bdrv_co_pwritev(bs->file, offset, bytes, qiov, flags); } =20 -static int blkdebug_co_flush(BlockDriverState *bs) +static int coroutine_fn +blkdebug_co_flush(BlockDriverState *bs) { int err =3D rule_check(bs, 0, 0); =20 @@ -656,7 +658,8 @@ static void blkdebug_close(BlockDriverState *bs) g_free(s->config_file); } =20 -static void suspend_request(BlockDriverState *bs, BlkdebugRule *rule) +static void coroutine_fn +suspend_request(BlockDriverState *bs, BlkdebugRule *rule) { BDRVBlkdebugState *s =3D bs->opaque; BlkdebugSuspendedReq r; @@ -681,7 +684,8 @@ static void suspend_request(BlockDriverState *bs, Blkde= bugRule *rule) g_free(r.tag); } =20 -static bool process_rule(BlockDriverState *bs, struct BlkdebugRule *rule, +static bool coroutine_fn +process_rule(BlockDriverState *bs, struct BlkdebugRule *rule, bool injected) { BDRVBlkdebugState *s =3D bs->opaque; @@ -712,7 +716,8 @@ static bool process_rule(BlockDriverState *bs, struct B= lkdebugRule *rule, return injected; } =20 -static void blkdebug_debug_event(BlockDriverState *bs, BlkdebugEvent event) +static void coroutine_fn +blkdebug_debug_event(BlockDriverState *bs, BlkdebugEvent event) { BDRVBlkdebugState *s =3D bs->opaque; struct BlkdebugRule *rule, *next; diff --git a/block/blkverify.c b/block/blkverify.c index 06369f9eac..d0c946173a 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -255,7 +255,8 @@ blkverify_co_pwritev(BlockDriverState *bs, uint64_t off= set, uint64_t bytes, return blkverify_co_prwv(bs, &r, offset, bytes, qiov, qiov, flags, tru= e); } =20 -static int blkverify_co_flush(BlockDriverState *bs) +static int coroutine_fn +blkverify_co_flush(BlockDriverState *bs) { BDRVBlkverifyState *s =3D bs->opaque; =20 diff --git a/block/io.c b/block/io.c index 14b88c8609..a53a86df3e 100644 --- a/block/io.c +++ b/block/io.c @@ -366,7 +366,8 @@ void bdrv_drain_all(void) * * This function should be called when a tracked request is completing. */ -static void tracked_request_end(BdrvTrackedRequest *req) +static void coroutine_fn +tracked_request_end(BdrvTrackedRequest *req) { if (req->serialising) { atomic_dec(&req->bs->serialising_in_flight); @@ -381,7 +382,8 @@ static void tracked_request_end(BdrvTrackedRequest *req) /** * Add an active request to the tracked requests list */ -static void tracked_request_begin(BdrvTrackedRequest *req, +static void coroutine_fn +tracked_request_begin(BdrvTrackedRequest *req, BlockDriverState *bs, int64_t offset, unsigned int bytes, @@ -2430,7 +2432,8 @@ int bdrv_pdiscard(BlockDriverState *bs, int64_t offse= t, int bytes) return rwco.ret; } =20 -int bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf) +int coroutine_fn +bdrv_co_ioctl(BlockDriverState *bs, int req, void *buf) { BlockDriver *drv =3D bs->drv; CoroutineIOCompletion co =3D { --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207166083570.7472847564388; Tue, 4 Jul 2017 15:26:06 -0700 (PDT) Received: from localhost ([::1]:43236 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWGi-00038W-RP for importer@patchew.org; Tue, 04 Jul 2017 18:26:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49372) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVyD-00018i-9i for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVyA-0001SY-Pa for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:06:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54530) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVy7-0001O0-Vh; Tue, 04 Jul 2017 18:06:52 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 073C23B73D; Tue, 4 Jul 2017 22:06:51 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id E54CA6928C; Tue, 4 Jul 2017 22:06:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 073C23B73D Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 073C23B73D From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:41 +0200 Message-Id: <20170704220346.29244-31-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 04 Jul 2017 22:06:51 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 30/35] block-backend: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- include/sysemu/block-backend.h | 4 ++-- block/block-backend.c | 36 ++++++++++++++++++++++++------------ 2 files changed, 26 insertions(+), 14 deletions(-) diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index 1e05281fff..2f967037af 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -165,8 +165,8 @@ int blk_co_ioctl(BlockBackend *blk, unsigned long int r= eq, void *buf); int blk_ioctl(BlockBackend *blk, unsigned long int req, void *buf); BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *= buf, BlockCompletionFunc *cb, void *opaque); -int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int bytes); -int blk_co_flush(BlockBackend *blk); +int coroutine_fn blk_co_pdiscard(BlockBackend *blk, int64_t offset, int by= tes); +int coroutine_fn blk_co_flush(BlockBackend *blk); int blk_flush(BlockBackend *blk); int blk_commit_all(void); void blk_drain(BlockBackend *blk); diff --git a/block/block-backend.c b/block/block-backend.c index 56fc0a4d1e..a48aa4f900 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1032,7 +1032,8 @@ typedef struct BlkRwCo { BdrvRequestFlags flags; } BlkRwCo; =20 -static void blk_read_entry(void *opaque) +static void coroutine_fn +blk_read_entry(void *opaque) { BlkRwCo *rwco =3D opaque; =20 @@ -1040,7 +1041,8 @@ static void blk_read_entry(void *opaque) rwco->qiov, rwco->flags); } =20 -static void blk_write_entry(void *opaque) +static void coroutine_fn +blk_write_entry(void *opaque) { BlkRwCo *rwco =3D opaque; =20 @@ -1195,7 +1197,8 @@ static BlockAIOCB *blk_aio_prwv(BlockBackend *blk, in= t64_t offset, int bytes, return &acb->common; } =20 -static void blk_aio_read_entry(void *opaque) +static void coroutine_fn +blk_aio_read_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1206,7 +1209,8 @@ static void blk_aio_read_entry(void *opaque) blk_aio_complete(acb); } =20 -static void blk_aio_write_entry(void *opaque) +static void coroutine_fn +blk_aio_write_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1288,7 +1292,8 @@ BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_= t offset, blk_aio_write_entry, flags, cb, opaque); } =20 -static void blk_aio_flush_entry(void *opaque) +static void coroutine_fn +blk_aio_flush_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1303,7 +1308,8 @@ BlockAIOCB *blk_aio_flush(BlockBackend *blk, return blk_aio_prwv(blk, 0, 0, NULL, blk_aio_flush_entry, 0, cb, opaqu= e); } =20 -static void blk_aio_pdiscard_entry(void *opaque) +static void coroutine_fn +blk_aio_pdiscard_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1339,7 +1345,8 @@ int blk_co_ioctl(BlockBackend *blk, unsigned long int= req, void *buf) return bdrv_co_ioctl(blk_bs(blk), req, buf); } =20 -static void blk_ioctl_entry(void *opaque) +static void coroutine_fn +blk_ioctl_entry(void *opaque) { BlkRwCo *rwco =3D opaque; rwco->ret =3D blk_co_ioctl(rwco->blk, rwco->offset, @@ -1351,7 +1358,8 @@ int blk_ioctl(BlockBackend *blk, unsigned long int re= q, void *buf) return blk_prw(blk, req, buf, 0, blk_ioctl_entry, 0); } =20 -static void blk_aio_ioctl_entry(void *opaque) +static void coroutine_fn +blk_aio_ioctl_entry(void *opaque) { BlkAioEmAIOCB *acb =3D opaque; BlkRwCo *rwco =3D &acb->rwco; @@ -1376,7 +1384,8 @@ BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned= long int req, void *buf, return blk_aio_prwv(blk, req, 0, &qiov, blk_aio_ioctl_entry, 0, cb, op= aque); } =20 -int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int bytes) +int coroutine_fn +blk_co_pdiscard(BlockBackend *blk, int64_t offset, int bytes) { int ret =3D blk_check_byte_request(blk, offset, bytes); if (ret < 0) { @@ -1386,7 +1395,8 @@ int blk_co_pdiscard(BlockBackend *blk, int64_t offset= , int bytes) return bdrv_co_pdiscard(blk_bs(blk), offset, bytes); } =20 -int blk_co_flush(BlockBackend *blk) +int coroutine_fn +blk_co_flush(BlockBackend *blk) { if (!blk_is_available(blk)) { return -ENOMEDIUM; @@ -1395,7 +1405,8 @@ int blk_co_flush(BlockBackend *blk) return bdrv_co_flush(blk_bs(blk)); } =20 -static void blk_flush_entry(void *opaque) +static void coroutine_fn +blk_flush_entry(void *opaque) { BlkRwCo *rwco =3D opaque; rwco->ret =3D blk_co_flush(rwco->blk); @@ -1785,7 +1796,8 @@ int blk_truncate(BlockBackend *blk, int64_t offset, E= rror **errp) return bdrv_truncate(blk->root, offset, errp); } =20 -static void blk_pdiscard_entry(void *opaque) +static void coroutine_fn +blk_pdiscard_entry(void *opaque) { BlkRwCo *rwco =3D opaque; rwco->ret =3D blk_co_pdiscard(rwco->blk, rwco->offset, rwco->qiov->siz= e); --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207435466732.862900330705; Tue, 4 Jul 2017 15:30:35 -0700 (PDT) Received: from localhost ([::1]:43263 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWL4-0006O1-5y for importer@patchew.org; Tue, 04 Jul 2017 18:30:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVyH-0001Cn-Ts for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVyH-0001Vx-5t for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54576) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVyF-0001V0-6d; Tue, 04 Jul 2017 18:06:59 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 337633B703; Tue, 4 Jul 2017 22:06:58 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2444A60469; Tue, 4 Jul 2017 22:06:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 337633B703 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 337633B703 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:42 +0200 Message-Id: <20170704220346.29244-32-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 04 Jul 2017 22:06:58 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 31/35] parallels: mark coroutine_fn 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 , "open list:parallels" , Max Reitz , Stefan Hajnoczi , "Denis V. Lunev" , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Denis V. Lunev --- block/parallels.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index 8be46a7d48..213e42b9d2 100644 --- a/block/parallels.c +++ b/block/parallels.c @@ -472,7 +472,8 @@ static int parallels_check(BlockDriverState *bs, BdrvCh= eckResult *res, } =20 =20 -static int parallels_create(const char *filename, QemuOpts *opts, Error **= errp) +static int coroutine_fn +parallels_create(const char *filename, QemuOpts *opts, Error **errp) { int64_t total_size, cl_size; uint8_t tmp[BDRV_SECTOR_SIZE]; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206824488499.4946452414856; Tue, 4 Jul 2017 15:20:24 -0700 (PDT) Received: from localhost ([::1]:43194 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWBD-0005kv-5W for importer@patchew.org; Tue, 04 Jul 2017 18:20:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49457) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVyN-0001II-Lh for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVyM-0001Xq-Fv for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39226) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVyI-0001W7-9X; Tue, 04 Jul 2017 18:07:02 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 49A5580F6B; Tue, 4 Jul 2017 22:07:01 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 824E060469; Tue, 4 Jul 2017 22:07:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 49A5580F6B Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 49A5580F6B From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:43 +0200 Message-Id: <20170704220346.29244-33-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 04 Jul 2017 22:07:01 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 32/35] qed: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:qed" , Stefan Hajnoczi , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/qed.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/qed.c b/block/qed.c index 385381a78a..dd2859a1c9 100644 --- a/block/qed.c +++ b/block/qed.c @@ -622,7 +622,8 @@ out: return ret; } =20 -static int bdrv_qed_create(const char *filename, QemuOpts *opts, Error **e= rrp) +static int coroutine_fn +bdrv_qed_create(const char *filename, QemuOpts *opts, Error **errp) { uint64_t image_size =3D 0; uint32_t cluster_size =3D QED_DEFAULT_CLUSTER_SIZE; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207261876597.1354826835499; Tue, 4 Jul 2017 15:27:41 -0700 (PDT) Received: from localhost ([::1]:43244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWIG-0004G1-N3 for importer@patchew.org; Tue, 04 Jul 2017 18:27:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49472) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVyP-0001Jz-94 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVyO-0001YW-G1 for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34612) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVyM-0001XP-8U; Tue, 04 Jul 2017 18:07:06 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4BE15C04B939; Tue, 4 Jul 2017 22:07:05 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 854E65C7C3; Tue, 4 Jul 2017 22:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4BE15C04B939 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 4BE15C04B939 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:44 +0200 Message-Id: <20170704220346.29244-34-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 04 Jul 2017 22:07:05 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 33/35] vdi: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Max Reitz , "open list:VDI" , Stefan Weil Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/vdi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vdi.c b/block/vdi.c index 79af47763b..53cd7f64d8 100644 --- a/block/vdi.c +++ b/block/vdi.c @@ -716,7 +716,8 @@ vdi_co_pwritev(BlockDriverState *bs, uint64_t offset, u= int64_t bytes, return ret; } =20 -static int vdi_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +vdi_create(const char *filename, QemuOpts *opts, Error **errp) { int ret =3D 0; uint64_t bytes =3D 0; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499206980479275.8716136653976; Tue, 4 Jul 2017 15:23:00 -0700 (PDT) Received: from localhost ([::1]:43214 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWDj-00081G-4G for importer@patchew.org; Tue, 04 Jul 2017 18:22:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVyX-0001RN-2q for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVyW-0001aq-CI for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48250) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVyS-0001ZW-6E; Tue, 04 Jul 2017 18:07:12 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 312EBC0587D4; Tue, 4 Jul 2017 22:07:11 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D3585D968; Tue, 4 Jul 2017 22:07:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 312EBC0587D4 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 312EBC0587D4 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:45 +0200 Message-Id: <20170704220346.29244-35-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 04 Jul 2017 22:07:11 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 34/35] vhdx: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Jeff Cody , "open list:VHDX" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/vhdx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vhdx.c b/block/vhdx.c index 8b270b57c9..56b54f3ed7 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1787,7 +1787,8 @@ exit: * .---- ~ ----------- ~ ------------ ~ ---------------- ~ -----------. * 1MB */ -static int vhdx_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +vhdx_create(const char *filename, QemuOpts *opts, Error **errp) { int ret =3D 0; uint64_t image_size =3D (uint64_t) 2 * GiB; --=20 2.13.1.395.gf7b71de06 From nobody Tue May 7 16:44:18 2024 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 1499207360913417.72978711709595; Tue, 4 Jul 2017 15:29:20 -0700 (PDT) Received: from localhost ([::1]:43249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSWJr-0005PL-Pg for importer@patchew.org; Tue, 04 Jul 2017 18:29:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49556) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dSVye-0001YA-2J for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dSVya-0001ez-Tw for qemu-devel@nongnu.org; Tue, 04 Jul 2017 18:07:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38382) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dSVyY-0001bv-PD; Tue, 04 Jul 2017 18:07:18 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B292919CBD1; Tue, 4 Jul 2017 22:07:17 +0000 (UTC) Received: from localhost (unknown [10.36.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 89F3C6292C; Tue, 4 Jul 2017 22:07:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B292919CBD1 Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=marcandre.lureau@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B292919CBD1 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Wed, 5 Jul 2017 00:03:46 +0200 Message-Id: <20170704220346.29244-36-marcandre.lureau@redhat.com> In-Reply-To: <20170704220346.29244-1-marcandre.lureau@redhat.com> References: <20170704220346.29244-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 04 Jul 2017 22:07:17 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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] [PATCH 35/35] vpc: mark coroutine_fn 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 , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , "open list:vpc" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- block/vpc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/vpc.c b/block/vpc.c index 4240ba9d1c..1b4aba20bd 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -872,7 +872,8 @@ static int create_fixed_disk(BlockBackend *blk, uint8_t= *buf, return ret; } =20 -static int vpc_create(const char *filename, QemuOpts *opts, Error **errp) +static int coroutine_fn +vpc_create(const char *filename, QemuOpts *opts, Error **errp) { uint8_t buf[1024]; VHDFooter *footer =3D (VHDFooter *) buf; --=20 2.13.1.395.gf7b71de06