From nobody Mon Feb 9 19:08:26 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=openvz.org ARC-Seal: i=1; a=rsa-sha256; t=1592324591; cv=none; d=zohomail.com; s=zohoarc; b=k0lSfQ5STbSko9QIRJp+QqFRKYMXf91TeA0y5L8x7f9ZI/6p5p+MKemBJgC0ZvOe/EV2qYkVLyWfEgq+ux/E/Pdehkl+FYLH8g/kwMcqWQrNtU6alJ5PbfcLGQwbcoBz2ekP2lqWZ37zzp/9Thludd2Wu61Z71bvUNCold3fLXE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1592324591; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=uE1ULfLGmhwAlkxu+GAB/0sCd2KLqJ1IVpY+eFgtnac=; b=VIUW21HQ28z4dGG9DMleewe+bWeEqoMb49IGNp+z64AyG/jbQ62v94i9aAwvYNJJp2gGx9N2XLS3+eC5ICPLEKPzHkjCHckz9V4JcVeEPKtxTcO0632NUUTwPaZN2jP4z61IJzn3qetdlPSrpbpP6CKTneamS5S9/8IwJV5uttY= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1592324591275499.05763509986116; Tue, 16 Jun 2020 09:23:11 -0700 (PDT) Received: from localhost ([::1]:59962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlEMg-000191-1l for importer@patchew.org; Tue, 16 Jun 2020 12:23:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlEKP-00051s-7a; Tue, 16 Jun 2020 12:20:49 -0400 Received: from relay.sw.ru ([185.231.240.75]:43698 helo=relay3.sw.ru) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlEKJ-0006a1-7J; Tue, 16 Jun 2020 12:20:48 -0400 Received: from [192.168.15.172] (helo=iris.lishka.ru) by relay3.sw.ru with esmtp (Exim 4.93) (envelope-from ) id 1jlEK1-0003Pf-Ai; Tue, 16 Jun 2020 19:20:25 +0300 From: "Denis V. Lunev" To: qemu-block@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH 3/5] block/aio_task: drop aio_task_pool_wait_one() helper Date: Tue, 16 Jun 2020 19:20:33 +0300 Message-Id: <20200616162035.29857-4-den@openvz.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200616162035.29857-1-den@openvz.org> References: <20200616162035.29857-1-den@openvz.org> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=185.231.240.75; envelope-from=den@openvz.org; helo=relay3.sw.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/16 12:20:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Fam Zheng , Vladimir Sementsov-Ogievskiy , Juan Quintela , "Dr. David Alan Gilbert" , Max Reitz , Denis Plotnikov , Stefan Hajnoczi , "Denis V. Lunev" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It is not used outside the module. Actually there are 2 kind of waiters: - for a slot and - for all tasks to finish This patch limits external API to listed types. Signed-off-by: Denis V. Lunev Suggested-by: Vladimir Sementsov-Ogievskiy CC: Kevin Wolf CC: Max Reitz CC: Stefan Hajnoczi CC: Fam Zheng CC: Juan Quintela CC: "Dr. David Alan Gilbert" CC: Vladimir Sementsov-Ogievskiy CC: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/aio_task.c | 13 ++----------- include/block/aio_task.h | 1 - 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/block/aio_task.c b/block/aio_task.c index cf62e5c58b..7ba15ff41f 100644 --- a/block/aio_task.c +++ b/block/aio_task.c @@ -54,26 +54,17 @@ static void coroutine_fn aio_task_co(void *opaque) qemu_co_queue_restart_all(&pool->waiters); } =20 -void coroutine_fn aio_task_pool_wait_one(AioTaskPool *pool) -{ - assert(pool->busy_tasks > 0); - - qemu_co_queue_wait(&pool->waiters, NULL); - - assert(pool->busy_tasks < pool->max_busy_tasks); -} - void coroutine_fn aio_task_pool_wait_slot(AioTaskPool *pool) { while (pool->busy_tasks >=3D pool->max_busy_tasks) { - aio_task_pool_wait_one(pool); + qemu_co_queue_wait(&pool->waiters, NULL); } } =20 void coroutine_fn aio_task_pool_wait_all(AioTaskPool *pool) { while (pool->busy_tasks > 0) { - aio_task_pool_wait_one(pool); + qemu_co_queue_wait(&pool->waiters, NULL); } } =20 diff --git a/include/block/aio_task.h b/include/block/aio_task.h index 50bc1e1817..50b1c036c5 100644 --- a/include/block/aio_task.h +++ b/include/block/aio_task.h @@ -48,7 +48,6 @@ bool aio_task_pool_empty(AioTaskPool *pool); void coroutine_fn aio_task_pool_start_task(AioTaskPool *pool, AioTask *tas= k); =20 void coroutine_fn aio_task_pool_wait_slot(AioTaskPool *pool); -void coroutine_fn aio_task_pool_wait_one(AioTaskPool *pool); void coroutine_fn aio_task_pool_wait_all(AioTaskPool *pool); =20 #endif /* BLOCK_AIO_TASK_H */ --=20 2.17.1