From nobody Tue Feb 10 15:02:59 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; 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=yandex-team.ru ARC-Seal: i=1; a=rsa-sha256; t=1615788658; cv=none; d=zohomail.com; s=zohoarc; b=W44KVJ3mGBQhRPiWPNT3BoPxZCRKoYS8ukLGC8lDb9lgjo88sYVmwBl2DZ3fHb6s/ZKjO5A669S785ZZGFR8JTF/iixUE896iWyv8ZFShrP4B+65/YK7ccc3XAui4S0tHgu5CZ/wJWHD+cknLSEJSKLBtJSvd4KsFbs7afgJMCo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1615788658; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=59ZvSWAYCL+QmZmMyzOFun6eZVfFXcIJ0m4xhO4qzKY=; b=TRCZG4vO0AgAE9j5HFjRH1VHMR8JzeI6VxirAQ81ZDltnINDfvXn810Tg96fcGiKD1Zq3m+MmNdH5TCdAzXBLrK8vx0LXDDfmG5dOr2Cn26nhVSx7qTDnhuwGxlg4QDCM37DEEd/U01VJRR9becm3Sk+FHPoEJljAGk+thZ8/0g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; 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 161578865808113.275243036268876; Sun, 14 Mar 2021 23:10:58 -0700 (PDT) Received: from localhost ([::1]:42446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLgRL-000695-QP for importer@patchew.org; Mon, 15 Mar 2021 02:10:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47106) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLgMw-000158-2Y; Mon, 15 Mar 2021 02:06:22 -0400 Received: from forwardcorp1o.mail.yandex.net ([95.108.205.193]:47644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLgMs-0004dx-Pu; Mon, 15 Mar 2021 02:06:21 -0400 Received: from sas1-ec30c78b6c5b.qloud-c.yandex.net (sas1-ec30c78b6c5b.qloud-c.yandex.net [IPv6:2a02:6b8:c14:2704:0:640:ec30:c78b]) by forwardcorp1o.mail.yandex.net (Yandex) with ESMTP id DB6D92E14DF; Mon, 15 Mar 2021 09:06:16 +0300 (MSK) Received: from sas1-24e978739efd.qloud-c.yandex.net (sas1-24e978739efd.qloud-c.yandex.net [2a02:6b8:c14:3088:0:640:24e9:7873]) by sas1-ec30c78b6c5b.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id 1SzG6WpSW2-6GY0jP3q; Mon, 15 Mar 2021 09:06:16 +0300 Received: from dynamic-vpn.dhcp.yndx.net (dynamic-vpn.dhcp.yndx.net [2a02:6b8:b081:23::1:15]) by sas1-24e978739efd.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id FoAWGMWkZt-6Gn0MMeT; Mon, 15 Mar 2021 09:06:16 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) Precedence: bulk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1615788376; bh=59ZvSWAYCL+QmZmMyzOFun6eZVfFXcIJ0m4xhO4qzKY=; h=In-Reply-To:Message-Id:References:Date:Subject:To:From:Cc; b=W/SbjbrCh8M7jZCpBL1JO2RVAXjkjz5mW9Seb5q+vQPZL0djBs599ni8vYp53BsiS WqCm4CYEfjdKbWd4PUEF3EwjIJaetjvme2pdl+93Ez/Ev/s+fhdEmdFnluVXbzkqid zqZID4nQyLvMKJTIpaIGZUCAd8BDk4kdT62nZYYU= Authentication-Results: sas1-ec30c78b6c5b.qloud-c.yandex.net; dkim=pass header.i=@yandex-team.ru From: Roman Kagan To: qemu-devel@nongnu.org Subject: [PATCH 5/7] block/nbd: better document a case in nbd_co_establish_connection Date: Mon, 15 Mar 2021 09:06:09 +0300 Message-Id: <20210315060611.2989049-6-rvkagan@yandex-team.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210315060611.2989049-1-rvkagan@yandex-team.ru> References: <20210315060611.2989049-1-rvkagan@yandex-team.ru> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=95.108.205.193; envelope-from=rvkagan@yandex-team.ru; helo=forwardcorp1o.mail.yandex.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Vladimir Sementsov-Ogievskiy , qemu-block@nongnu.org, Max Reitz , yc-core@yandex-team.ru Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Cosmetic: adjust the comment and the return value in nbd_co_establish_connection where it's entered while the connection thread is still running. Signed-off-by: Roman Kagan --- block/nbd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/block/nbd.c b/block/nbd.c index a6d713ba58..a3eb9b9079 100644 --- a/block/nbd.c +++ b/block/nbd.c @@ -562,11 +562,12 @@ nbd_co_establish_connection(BlockDriverState *bs, Err= or **errp) case CONNECT_THREAD_RUNNING: case CONNECT_THREAD_RUNNING_DETACHED: /* - * Obviously, drained section wants to start. Report the attempt as - * failed. Still connect thread is executing in background, and its + * Spurious corotine resume before connection attempt has finished, + * presumably upon attaching a new aio_context. Report the attempt= as + * failed. Still connect thread is executing in background, and i= ts * result may be used for next connection attempt. */ - ret =3D -1; + ret =3D -ECONNABORTED; error_setg(errp, "Connection attempt cancelled by other operation"= ); break; =20 --=20 2.30.2