From nobody Mon Feb 9 00:07:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 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=1595410861; cv=none; d=zohomail.com; s=zohoarc; b=k8M8Q1pEaVh9i8ScTb1FpS8NXK8bG6qaD1PzPzyOuY3Iym8jsoIItuai1gXtjtsTCczEv2gUP0NNeMuII6DAm8uaIboNmtUYbIoe8fu/n2ZGWDdPCgnfM6/fGoCQj/V2otn9myq9w5VUxQXIg+CT/bHyOr2pKQEvbAoi19nMY+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595410861; 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=j97pAJNPkFyAh0RMcSwy0wtJMQDep0/WjMshOxGBIFI=; b=RUgbuoyPfslrvtlf7JV1+1rcdO2unB8eH2gJvNNQDtCA9eF+gLmPjpLsCCTKOTMAKAlpbLp/nz6XhK0hj46ZsjUkx7wRpPOP7/3PlVxnVr0hdKjZpyv/RPAHcY9kbeTXuq43y7tVBEHwVkIki02YXPd/aHd81picfJKN/4MVS/g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1595410861099155.77944892728385; Wed, 22 Jul 2020 02:41:01 -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-71-wXOBQvOGOJmO79xfqr8bbg-1; Wed, 22 Jul 2020 05:40:54 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 50DBE80046A; Wed, 22 Jul 2020 09:40:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1426B2B4DA; Wed, 22 Jul 2020 09:40:48 +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 D62921800B72; Wed, 22 Jul 2020 09:40:47 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06M9edwo000836 for ; Wed, 22 Jul 2020 05:40:39 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8783E1A90F; Wed, 22 Jul 2020 09:40:39 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 06C2B1A8F7 for ; Wed, 22 Jul 2020 09:40:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595410859; 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=j97pAJNPkFyAh0RMcSwy0wtJMQDep0/WjMshOxGBIFI=; b=LUIC3/dwE3bOb6IIzAru5sSuL3A+nykN/9hqs4wzozD+768elT4DliyFnlmszDLoX5swzS Z80/ChxtNrAf0hbLptp8M7A19z0Z1zvsUfN/1P+cKKHYPrb4Yloctk1MSByt4LbPpfAy8+ rjg4SAuBKyGdd7kwyNqOCX5JNbv7hxY= X-MC-Unique: wXOBQvOGOJmO79xfqr8bbg-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v1 04/34] qemu_domain_namespace: Rename qemuDomainCreateNamespace() Date: Wed, 22 Jul 2020 11:39:58 +0200 Message-Id: <3a9e4760d99cf8b5275d1c8b93c3517c1de3ff75.1595410402.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.23 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) Content-Type: text/plain; charset="utf-8" The name of this function is not very helpful, because it doesn't create anything, it just flips a bit in a bitmask when domain is starting up. Move the function internals into qemu_process.c and forget the function ever existed. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain_namespace.c | 14 -------------- src/qemu/qemu_domain_namespace.h | 3 --- src/qemu/qemu_process.c | 16 +++++++++++++++- 3 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namesp= ace.c index 1e54cb2153..ec417edb60 100644 --- a/src/qemu/qemu_domain_namespace.c +++ b/src/qemu/qemu_domain_namespace.c @@ -1035,20 +1035,6 @@ qemuDomainBuildNamespace(virQEMUDriverConfigPtr cfg, } =20 =20 -int -qemuDomainCreateNamespace(virQEMUDriverPtr driver, - virDomainObjPtr vm) -{ - g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); - - if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) && - qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0) - return -1; - - return 0; -} - - bool qemuDomainNamespaceEnabled(virDomainObjPtr vm, qemuDomainNamespace ns) diff --git a/src/qemu/qemu_domain_namespace.h b/src/qemu/qemu_domain_namesp= ace.h index df58462414..0182ce50a2 100644 --- a/src/qemu/qemu_domain_namespace.h +++ b/src/qemu/qemu_domain_namespace.h @@ -41,9 +41,6 @@ int qemuDomainBuildNamespace(virQEMUDriverConfigPtr cfg, virSecurityManagerPtr mgr, virDomainObjPtr vm); =20 -int qemuDomainCreateNamespace(virQEMUDriverPtr driver, - virDomainObjPtr vm); - void qemuDomainDestroyNamespace(virQEMUDriverPtr driver, virDomainObjPtr vm); =20 diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e368f59b8c..c076dcac3a 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6640,6 +6640,20 @@ qemuProcessSetupDiskThrottlingBlockdev(virQEMUDriver= Ptr driver, } =20 =20 +static int +qemuProcessEnableDomainNamespaces(virQEMUDriverPtr driver, + virDomainObjPtr vm) +{ + g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); + + if (virBitmapIsBitSet(cfg->namespaces, QEMU_DOMAIN_NS_MOUNT) && + qemuDomainEnableNamespace(vm, QEMU_DOMAIN_NS_MOUNT) < 0) + return -1; + + return 0; +} + + /** * qemuProcessLaunch: * @@ -6759,7 +6773,7 @@ qemuProcessLaunch(virConnectPtr conn, =20 VIR_DEBUG("Building mount namespace"); =20 - if (qemuDomainCreateNamespace(driver, vm) < 0) + if (qemuProcessEnableDomainNamespaces(driver, vm) < 0) goto cleanup; =20 VIR_DEBUG("Setting up raw IO"); --=20 2.26.2