From nobody Sun Feb 8 16:12:49 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=1695223707; cv=none; d=zohomail.com; s=zohoarc; b=mZy3FecF5ZBt9vZ1YitUa7iRsP4+8a0toC9vWnVgpQBkEyeMQphVkX2O0S1KK7CRP2Y1zrEtNfLYEeuwvy6XVnUm3A3t/Qicr6pIjFBL/xQCRP8EdiYoCHfO3quPvsdiB6Z3mt6QOR2X37S73Ti5imEvKyP5QP766KiMFeoa68Y= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1695223707; 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=ZJxQ7INPZ5A0Vl+YZGUZnLbZ7uB4K/27SP/vMx1D3m8=; b=VsSXY6Ch1t8mcofuwdAv9M3aBUrXwCY5GvOCO+DNSA0oVXj+hzgzy6htD3+jcvTuqXdFE5UcHRvrbxb8pe5I1PffbAZixwRV9kC4CNR/hmRb7yyMZiA4VKS9Xnus7pmW35ZS04sHD/g/iFCJlqOoa3fUL+kGmVz2JkM5K9lyzYc= 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 1695223707215467.7795138435047; Wed, 20 Sep 2023 08:28:27 -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-151-6ytyVklYNhWc7pp-TnAWDw-1; Wed, 20 Sep 2023 11:28:23 -0400 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB00418056AF; Wed, 20 Sep 2023 15:28:20 +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 95160492C37; Wed, 20 Sep 2023 15:28:20 +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 3BBDF19466EF; Wed, 20 Sep 2023 15:27:59 +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 41D32194658D for ; Wed, 20 Sep 2023 15:25:43 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1BF6EC154CC; Wed, 20 Sep 2023 15:25:33 +0000 (UTC) Received: from fedora.. (unknown [10.45.224.152]) by smtp.corp.redhat.com (Postfix) with ESMTP id B5FB7C154CA for ; Wed, 20 Sep 2023 15:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695223706; 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=ZJxQ7INPZ5A0Vl+YZGUZnLbZ7uB4K/27SP/vMx1D3m8=; b=EG3a5dG1mR2+DlU6YgytB+oBaY8fQlCd6AHHGJbKXZmnnagtUkQKGDtcTXxQX47qAo6v8D AXbAN+Nrzg8tXqdXFo4pmcu5nowr+VJqZQi0+jzjJCqCRBAHOWyeJNjYxg4fOFv3Xgra27 Gn9/zgJJsl6iIpwGLi9sG42qMClrmec= X-MC-Unique: 6ytyVklYNhWc7pp-TnAWDw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] qemu: extend filesystem XML validation Date: Wed, 20 Sep 2023 17:25:01 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 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 3.1 on 10.11.54.10 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: 1695223708357100001 Reject readonly argument for virtiofs and quotas for all filesystems. https://issues.redhat.com/browse/RHEL-4994 https://issues.redhat.com/browse/RHEL-4432 Signed-off-by: J=C3=A1n Tomko --- src/qemu/qemu_validate.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 8d2927af60..f02ed4d44e 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -4264,6 +4264,13 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs, _("only supports mount filesystem type")); return -1; } + + if (fs->space_hard_limit > 0 || space_soft_limit > 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("filesystem usage limits are not supported with Q= EMU")); + return -1; + } + if (fs->multidevs !=3D VIR_DOMAIN_FS_MULTIDEVS_DEFAULT && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_FSDEV_MULTIDEVS)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", @@ -4330,6 +4337,12 @@ qemuValidateDomainDeviceDefFS(virDomainFSDef *fs, } } =20 + if (fs->readonly) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("virtiofs does not support read-only access")= ); + return -1; + } + if (fs->model !=3D VIR_DOMAIN_FS_MODEL_DEFAULT) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("virtiofs does not support model")); --=20 2.41.0