From nobody Tue Feb 10 01:19:51 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1596714152; cv=none; d=zohomail.com; s=zohoarc; b=lwYwvXghC+9/Vo8k6pvETnA/eXJn6EmvTPoqbl4DV7xJnge/CfMtwfpRjZMCrvI8TVXXS+f8hTyO0UR837IoUvl9XPMhb18xgPVXzWChPSICKBGM+2A6HVMZJnrRJDWQT3em2p+kKnk7NKbvb4KmbtTimeJKt78EwxmYsa9FTCE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1596714152; h=Content-Type:Content-Transfer-Encoding:Cc: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=CESieq+9PzpIJMxSxZGIABSGjjTr4eHeuy1/qrwO8lk=; b=FTWhK5WK2kzGotPRceK40W3svFvGnBRQAZFUCeYOdooOXlbeYDOJlQlkVdcy0tTBwZuiHFqu4pXIGkmCq86QtxAlh9bY88QdAfoTIDDEUb6CaZgvVb3KgRUr898RuT6fn0xQFI2ukjnQVDvlE50jp0/hG2tAs/VTPhThG6eayiY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 159671415249225.228203866553258; Thu, 6 Aug 2020 04:42:32 -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-106-VHcrrzi6PXqiQmXUNWnPYg-1; Thu, 06 Aug 2020 07:42:28 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2EF741083E80; Thu, 6 Aug 2020 11:42:22 +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 0B9C47B904; Thu, 6 Aug 2020 11:42:22 +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 CB8681809557; Thu, 6 Aug 2020 11:42:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 076Bg2XM007532 for ; Thu, 6 Aug 2020 07:42:02 -0400 Received: by smtp.corp.redhat.com (Postfix) id C221E1001B2C; Thu, 6 Aug 2020 11:42:02 +0000 (UTC) Received: from hansolo.redhat.com (ovpn-13-2.pek2.redhat.com [10.72.13.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0EA11002391; Thu, 6 Aug 2020 11:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596714151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc: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=CESieq+9PzpIJMxSxZGIABSGjjTr4eHeuy1/qrwO8lk=; b=H0I/hemHmR82XYnp/CuxObPrXedGcx/nQwWUYHkny9oP3zX1qk0RwPDIRFTrBmfGDLkIbt T7oUBqM/WEm4KAp/aBVa5l+yyoVSFNspub/4cNcMjGTwX554Cvd69pD22M3wdqGhxglUg9 aDO9UY0jCLiy8cU0QypHVhVkbJot3NA= X-MC-Unique: VHcrrzi6PXqiQmXUNWnPYg-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH v3 2/5] conf: Support to parse rbd namespace attribute Date: Thu, 6 Aug 2020 19:41:43 +0800 Message-Id: <20200806114146.2033215-3-hhan@redhat.com> In-Reply-To: <20200806114146.2033215-1-hhan@redhat.com> References: <20200806114146.2033215-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: Han Han 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.79 on 10.5.11.13 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" Signed-off-by: Han Han --- src/conf/domain_conf.c | 4 ++++ src/util/virstoragefile.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ef67efa1da..163c934428 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9601,6 +9601,7 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node, =20 /* config file currently only works with remote disks */ src->configFile =3D virXPathString("string(./config/@file)", ctxt); + src->namespace =3D virXPathString("string(./@namespace)", ctxt); =20 if (src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_HTTP || src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_HTTPS) @@ -25083,6 +25084,9 @@ virDomainDiskSourceFormatNetwork(virBufferPtr attrB= uf, path =3D g_strdup_printf("%s/%s", src->volume, src->path); =20 virBufferEscapeString(attrBuf, " name=3D'%s'", path ? path : src->path= ); + if (src->namespace) + virBufferEscapeString(attrBuf, " namespace=3D'%s'", src->namespace= ); + virBufferEscapeString(attrBuf, " query=3D'%s'", src->query); =20 if (src->haveTLS !=3D VIR_TRISTATE_BOOL_ABSENT && diff --git a/src/util/virstoragefile.h b/src/util/virstoragefile.h index f73b3ee005..0364fe5e7e 100644 --- a/src/util/virstoragefile.h +++ b/src/util/virstoragefile.h @@ -284,6 +284,7 @@ struct _virStorageSource { char *snapshot; /* for storage systems supporting internal snapshots */ char *configFile; /* some storage systems use config file as part of the source definition */ + char *namespace; /* for the storage systems supporting namespace */ char *query; /* query string for HTTP based protocols */ size_t nhosts; virStorageNetHostDefPtr hosts; --=20 2.27.0