From nobody Sun Feb 8 13:16:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1633516196; cv=none; d=zohomail.com; s=zohoarc; b=Iq/SQwU+EjeHi/11Cx6Qe2A7kYSL7PGfU883G2JFSomKjjFw2HcpAnvyLUaCSispJUSs0ZjnBmVtuoG7G+I08PV8u85QyEJ17froAQ8r1purgEMB8nEdSIIpNCyQ0UEOoCl072A73+2KiBpSaNeJ0xdcTyJuHJPtKRIIcQ7otNA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1633516196; 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=kH3omtostUzP6MmpNwqHrpbPbVSiRogA0op2ZUYErYc=; b=Je/rCihVxeWVNgUML555W91y5xSfEv9rCckVE0H48HpJuKswJfvi8cutbRQvnqnnpKISNyzrBlrTZC93wHylbhqJqOaOEJeqD8Iy7Ioolyqyxd0H73ju7P6PNc9M9RAhTbyN7iu3si3E5sEkja2bYrEf1AnbEnnjrAfOWKlxwxw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1633516196169287.31707006782085; Wed, 6 Oct 2021 03:29:56 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-81-VgqXt0CjPFSwAAWKW2L-OA-1; Wed, 06 Oct 2021 06:29:50 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8589B19057A2; Wed, 6 Oct 2021 10:29:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 662AF100164A; Wed, 6 Oct 2021 10:29:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 09F724EA29; Wed, 6 Oct 2021 10:29:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 196AKT8b025060 for ; Wed, 6 Oct 2021 06:20:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id C0BF35D9DD; Wed, 6 Oct 2021 10:20:29 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.43.2.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AEAE5D9C6 for ; Wed, 6 Oct 2021 10:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1633516195; 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=kH3omtostUzP6MmpNwqHrpbPbVSiRogA0op2ZUYErYc=; b=QiS/xW6dxro+E0+aZc9fs5AnkpCm1maEP17NyTL5fA6FqSJKzoCOUKGbLHas/U33Hh3jIK yf5bNqYkGS05Bw/A9+5uFqU0UGQqbUnDiX4foXwINS7/ojYfe+9pXUjpa8BYQuLyYWqOb+ wI+XeD+7fvK+b6UvHXA7zduR7ky94Ro= X-MC-Unique: VgqXt0CjPFSwAAWKW2L-OA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCHv2 2/5] qemu: virtiofs: open a separate connection to virtlogd Date: Wed, 6 Oct 2021 12:20:20 +0200 Message-Id: <35deb4986a935e1f48881f8bc51d872464dfbcbe.1633515396.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1633516197659100001 Do not depend on passing a logManager. Create a new connection. Signed-off-by: J=C3=A1n Tomko Reviewed-by: Peter Krempa --- src/qemu/qemu_extdevice.c | 4 ++-- src/qemu/qemu_virtiofs.c | 8 ++++++-- src/qemu/qemu_virtiofs.h | 3 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c index ef0b3f1981..3c34bb8321 100644 --- a/src/qemu/qemu_extdevice.c +++ b/src/qemu/qemu_extdevice.c @@ -166,7 +166,7 @@ qemuExtDevicesCleanupHost(virQEMUDriver *driver, int qemuExtDevicesStart(virQEMUDriver *driver, virDomainObj *vm, - virLogManager *logManager, + virLogManager *logManager G_GNUC_UNUSED, bool incomingMigration) { virDomainDef *def =3D vm->def; @@ -197,7 +197,7 @@ qemuExtDevicesStart(virQEMUDriver *driver, virDomainFSDef *fs =3D def->fss[i]; =20 if (fs->fsdriver =3D=3D VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS && !fs-= >sock) { - if (qemuVirtioFSStart(logManager, driver, vm, fs) < 0) + if (qemuVirtioFSStart(driver, vm, fs) < 0) return -1; } } diff --git a/src/qemu/qemu_virtiofs.c b/src/qemu/qemu_virtiofs.c index 08a8b4ed42..3ca45457c1 100644 --- a/src/qemu/qemu_virtiofs.c +++ b/src/qemu/qemu_virtiofs.c @@ -157,8 +157,7 @@ qemuVirtioFSBuildCommandLine(virQEMUDriverConfig *cfg, } =20 int -qemuVirtioFSStart(virLogManager *logManager, - virQEMUDriver *driver, +qemuVirtioFSStart(virQEMUDriver *driver, virDomainObj *vm, virDomainFSDef *fs) { @@ -191,6 +190,11 @@ qemuVirtioFSStart(virLogManager *logManager, logpath =3D qemuVirtioFSCreateLogFilename(cfg, vm->def, fs->info.alias= ); =20 if (cfg->stdioLogD) { + g_autoptr(virLogManager) logManager =3D virLogManagerNew(driver->p= rivileged); + + if (!logManager) + goto cleanup; + if ((logfd =3D virLogManagerDomainOpenLogFile(logManager, "qemu", vm->def->uuid, diff --git a/src/qemu/qemu_virtiofs.h b/src/qemu/qemu_virtiofs.h index 1886339394..5463acef98 100644 --- a/src/qemu/qemu_virtiofs.h +++ b/src/qemu/qemu_virtiofs.h @@ -27,8 +27,7 @@ qemuVirtioFSCreateSocketFilename(virDomainObj *vm, const char *alias); =20 int -qemuVirtioFSStart(virLogManager *logManager, - virQEMUDriver *driver, +qemuVirtioFSStart(virQEMUDriver *driver, virDomainObj *vm, virDomainFSDef *fs); void --=20 2.31.1