From nobody Mon Feb 9 02:27:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; 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 207.211.31.81 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=1586336725; cv=none; d=zohomail.com; s=zohoarc; b=RpB2tX5woMgBsSaTpkGyLz0l2E75l2Q8f8H1d3HnrC3v9+tqVGNBJMNrzABZ2TW3BvRLpmlo8bJMCWUzXNlNFVfozUfWUsX5WYZ6ZkjHupe1nTAXwNftBCIGXo6sTyUzIQ60O6lV0eLCsi+be2gQB70fSccHhnJQddPze0SMghM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586336725; 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=1MfoXA7f+a69UcTNcQeS4xKnfuev3M+81aDcAGN3rps=; b=JgQWTfwYOjdM+25CZkKxKbAZ78lcduUCiH1eNq7YQ2ej/IhLoipeb6jDSRT8pvQVa+lUuVY+87mkWOpgpiGWEvX1pRoNxdmc2TTREWxc7G951VuJYCEAdWYZbtaqX/ziatMrhDKeiYEOuLCired1+xuQzTedV3M1jNQHvdrsSWY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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 [207.211.31.81]) by mx.zohomail.com with SMTPS id 15863367253141016.9337893754616; Wed, 8 Apr 2020 02:05:25 -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-405-yTZ7h4AzNseMmmpQupapsQ-1; Wed, 08 Apr 2020 05:05:21 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3B630800D4E; Wed, 8 Apr 2020 09:05:16 +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 58BD75D9CA; Wed, 8 Apr 2020 09:05:14 +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 4E01E1809565; Wed, 8 Apr 2020 09:05:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03895BlL025154 for ; Wed, 8 Apr 2020 05:05:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id C7FEBC0D8B; Wed, 8 Apr 2020 09:05:11 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-13-41.pek2.redhat.com [10.72.13.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 731E7C0D91; Wed, 8 Apr 2020 09:05:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1586336724; 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=1MfoXA7f+a69UcTNcQeS4xKnfuev3M+81aDcAGN3rps=; b=aACIYqzzgLhoz6ZKOwfwt4rFK28ULMoW9rhGlR9K8i4vQg9yE3OV+zlxArR3kS5U/sEFrE LDIojNwg/W3TG/8ErFjBwg4rb4gsZ9SMb4WtBufk3WBoR6Iey9IB5ULaHZ0ykREagCCLwO Utv2uGj/dA0FXzZWiqnjE7AwxgodAnk= X-MC-Unique: yTZ7h4AzNseMmmpQupapsQ-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 2/5] conf: Support to parse rbd namespace attribute Date: Wed, 8 Apr 2020 17:04:45 +0800 Message-Id: <20200408090448.156331-3-hhan@redhat.com> In-Reply-To: <20200408090448.156331-1-hhan@redhat.com> References: <20200408090448.156331-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, 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.14 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 6ad7552b..a4ee2e1e 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -9488,6 +9488,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) @@ -24614,6 +24615,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 7939c09c..8b683b7e 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.25.0