From nobody Mon Feb 9 04:45:48 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1647964982; cv=none; d=zohomail.com; s=zohoarc; b=hLUCBqtySt/T4RiWZ0x+p6zU1V/OuzCMxJeirBEfFudnnyNJYEjZn7+s8p8jMxnjdN7VI7jDxXh75WB/uNRASztc+ylDsnF9ZHAoN3yBmMqp4c2Zd2ULo8G/3RNxpCybj2V41QfilSZ5xw4uF4GtXXn+rLnbnrNKW6+yrAmmAnQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1647964982; h=Content-Type:Content-Transfer-Encoding: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=e66alCK6FBCCSZR1llz/wbEX2ce6YXN4Azco4WI4J0Y=; b=NSIQGCFwcS5RUAidA/qLWtM8zBX/nj7HxROcFH7TlGHyu41euvQokX97bUoATGHXZ4g5K8WABIaei9smGGyHBSNrhe0dj/QB3hUhauzWxIAlKreO5bEXA1/4fYn8QJuMxoIhZjP40MgmMjCi/eXxM4X7B6g4YF88fhu2DvVXmyI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1647964982966406.2082350110428; Tue, 22 Mar 2022 09:03:02 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-201-0gZYUxxFNfaTTRks2HVnvA-1; Tue, 22 Mar 2022 12:02:23 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5A0E08556F8; Tue, 22 Mar 2022 16:02:17 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 868B340E8116; Tue, 22 Mar 2022 16:02:16 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EC6161940366; Tue, 22 Mar 2022 16:02:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9B5BF1940352 for ; Tue, 22 Mar 2022 16:02:12 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 8770DC23DC3; Tue, 22 Mar 2022 16:02:12 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E4E1C07F5B for ; Tue, 22 Mar 2022 16:02:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647964981; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=e66alCK6FBCCSZR1llz/wbEX2ce6YXN4Azco4WI4J0Y=; b=cTFQIrD3ozzSG1kI7YJQf5TT1firLgeEq1Tk9NxI2brkZhhisNg1sinigFMixVpGElK8q7 4laC4EBY/0UY24gPOIpLtSN75ZvBbkHNhMK3kX6wgLNdAEe4BUdfT9NE7OS8UaQhDFp7QO py9cxKaKzBHuLh3TT+zOyMJY4WqY6Tc= X-MC-Unique: 0gZYUxxFNfaTTRks2HVnvA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 2/7] vircommand: Document virCommandSetSendBuffer() behaviour wrt daemonize Date: Tue, 22 Mar 2022 17:02:01 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1647964983846100001 Content-Type: text/plain; charset="utf-8" When virCommandSetSendBuffer() is used over a virCommand that is (or will be) daemonized, then VIR_EXEC_ASYNC_IO the command must have VIR_EXEC_ASYNC_IO flag set no later than at virCommandRunAsync() phase so that the thread that's doing IO is spawned and thus buffers can be sent to the process. Signed-off-by: Michal Privoznik --- src/util/vircommand.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/vircommand.c b/src/util/vircommand.c index 41cf552d7b..5f22bd0ac3 100644 --- a/src/util/vircommand.c +++ b/src/util/vircommand.c @@ -1719,6 +1719,9 @@ virCommandFreeSendBuffers(virCommand *cmd) * @buffer is always stolen regardless of the return value. This function * doesn't raise a libvirt error, but rather propagates the error via virC= ommand. * Thus callers don't need to take a special action if -1 is returned. + * + * When the @cmd is daemonized via virCommandDaemonize() remember to reque= st + * asynchronous IO via virCommandDoAsyncIO(). */ int virCommandSetSendBuffer(virCommand *cmd, --=20 2.34.1