From nobody Sun Feb 8 18:42:11 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1725719622; cv=none; d=zohomail.com; s=zohoarc; b=QLH6NX2Lyu8tUP+S8uJgCLIK4yOuUAFg3/ayIipKajcDkBcuskBkojyy60X23WpeXqysos8T+QwUdnc/LoP+rSXmRzfdTVvsP8RzMSIbb9DH/P8dwV3Bq/liPjBTPgFyqK4h/qlQMF/ERAjThg9vzFAp7lrQJk/eKEbaT2bS/hY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1725719622; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id; bh=YY4o1VfzewWQ+tQyzhEWGApcAai53RhcLPR6rn4FLW0=; b=FbgKYZJyXjpF3QOX2m/ZCJ1T4kHQUQmSRknj3uvuv26XD2wXicMkVp4WoukDu9cGD32wROAPDEMxw3Xv4t49Ps4SBMC1qIEi0b++7PEbGUPiBnQ20KqsSpKdp5kaaTf9Yx3l7S7Z2DRYO/QX2oJRSe/wzcXhnks3+9h4GJQO3iU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1725719622974303.2817619541539; Sat, 7 Sep 2024 07:33:42 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D72891955; Sat, 7 Sep 2024 10:33:41 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 88FF418AA; Sat, 7 Sep 2024 10:32:20 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 2ACD3172F; Sat, 7 Sep 2024 10:32:16 -0400 (EDT) Received: from relay.virtuozzo.com (relay.virtuozzo.com [130.117.225.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 33DD0180E for ; Sat, 7 Sep 2024 10:32:00 -0400 (EDT) Received: from [130.117.225.1] (helo=vz9-barybin-2.ch-qa.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1smwRH-001ZxE-1L; Sat, 07 Sep 2024 16:31:54 +0200 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=r6bPR/kLV1GX2qLmzxy34kewnSia6BrKh5GT6lu+Li0=; b=s05gez3vz8bW 0pTj4pF8Gw7oVIVbZMIEH36kMn78q91d4Gmec2BuM9SsOuXXd0uRR6/EW+q6NTO2/hJIQF7BRvUuR vw5NSp9tgq33pbP/p0lh/Olvl204UQPaBJl6XLtLpFm5dLdeHRrjCBvbrDqsgkQ7bL6ci1lyfBUeI uuNjruf4fwQ8aDRBczGC8ms0oYdYe9jOiuycEyk5+LjWnGariDlXyKCBfjWc7BFRxd5bufIfZnK5H WnMNYSmRvK4432XIneY4Cb3urV3Nrf9AobphtPAIztRo9Mkfh69+eVFTM9AaARy3fhb4V3aFz6t7b hssxFQ7yIaALJOfZ3SMCHg==; To: devel@lists.libvirt.org Subject: [PATCH v2 08/13] qemu: put data-file path to VM's cgroup and namespace Date: Sat, 7 Sep 2024 17:15:31 +0300 Message-ID: <20240907143006.50677-17-nikolai.barybin@virtuozzo.com> X-Mailer: git-send-email 2.43.5 In-Reply-To: <20240907143006.50677-1-nikolai.barybin@virtuozzo.com> References: <20240907143006.50677-1-nikolai.barybin@virtuozzo.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QJ3KQ46NSENVWOJJZI4FREXVB34DQNMJ X-Message-ID-Hash: QJ3KQ46NSENVWOJJZI4FREXVB34DQNMJ X-MailFrom: nikolai.barybin@virtuozzo.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: den@openvz.org, Nikolai Barybin X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Nikolai Barybin via Devel Reply-To: Nikolai Barybin X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1725719623170116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Nikolai Barybin --- src/qemu/qemu_cgroup.c | 4 ++++ src/qemu/qemu_namespace.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c index 23b7e6b4e8..a6d3c16e50 100644 --- a/src/qemu/qemu_cgroup.c +++ b/src/qemu/qemu_cgroup.c @@ -223,6 +223,10 @@ qemuSetupImageCgroupInternal(virDomainObj *vm, qemuSetupImagePathCgroup(vm, QEMU_DEVICE_MAPPER_CONTROL_PATH, fals= e) < 0) return -1; =20 + if (src->dataFileStore && + qemuSetupImagePathCgroup(vm, src->dataFileStore->path, readonly) <= 0) + return -1; + return qemuSetupImagePathCgroup(vm, path, readonly); } =20 diff --git a/src/qemu/qemu_namespace.c b/src/qemu/qemu_namespace.c index bbe3d5a1f7..afeec63a4f 100644 --- a/src/qemu/qemu_namespace.c +++ b/src/qemu/qemu_namespace.c @@ -290,6 +290,11 @@ qemuDomainSetupDisk(virStorageSource *src, =20 if (targetPaths) *paths =3D g_slist_concat(g_slist_reverse(targetPaths), *p= aths); + + if (next->dataFileStore) { + g_autofree char *dataFilePath =3D g_strdup(next->dataFileS= tore->path); + *paths =3D g_slist_prepend(*paths, g_steal_pointer(&dataFi= lePath)); + } } =20 *paths =3D g_slist_prepend(*paths, g_steal_pointer(&tmpPath)); --=20 2.43.5