Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
9ea3fdc6
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9ea3fdc6
编写于
8月 07, 2018
作者:
P
Pavel Hrdina
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
conf: introduce initiator IQN support for domain disks
Signed-off-by:
N
Pavel Hrdina
<
phrdina@redhat.com
>
上级
be16f170
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
40 addition
and
0 deletion
+40
-0
docs/formatdomain.html.in
docs/formatdomain.html.in
+20
-0
docs/schemas/domaincommon.rng
docs/schemas/domaincommon.rng
+3
-0
src/conf/domain_conf.c
src/conf/domain_conf.c
+10
-0
src/util/virstoragefile.c
src/util/virstoragefile.c
+5
-0
src/util/virstoragefile.h
src/util/virstoragefile.h
+2
-0
未找到文件。
docs/formatdomain.html.in
浏览文件 @
9ea3fdc6
...
...
@@ -2733,6 +2733,17 @@
<
/source
>
<
target dev='sdb' bus='scsi'/
>
<
/disk
>
<
/disk
>
<
disk type='network' device='lun'
>
<
driver name='qemu' type='raw'/
>
<
source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/0'
>
<
host name='example.com' port='3260'/
>
<
initiator
>
<
iqn name='iqn.2013-07.com.example:client'/
>
<
/initiator
>
<
/source
>
<
target dev='sdb' bus='scsi'/
>
<
/disk
>
<
disk type='volume' device='disk'
>
<
driver name='qemu' type='raw'/
>
<
source pool='iscsi-pool' volume='unit:0:0:1' mode='host'/
>
...
...
@@ -3090,6 +3101,15 @@
It's recommended to allow libvirt manage the persistent
reservations.
</dd>
<dt><code>
initiator
</code></dt>
<dd><span
class=
"since"
>
Since libvirt 4.7.0
</span>
, the
<code>
initiator
</code>
element is supported for a disk
<code>
type
</code>
"network" that is using a
<code>
source
</code>
element with the
<code>
protocol
</code>
attribute "iscsi".
If present, the
<code>
initiator
</code>
element provides the
initiator IQN needed to access the source via mandatory
attribute
<code>
name
</code>
.
</dd>
</dl>
<p>
...
...
docs/schemas/domaincommon.rng
浏览文件 @
9ea3fdc6
...
...
@@ -1699,6 +1699,9 @@
<optional>
<ref
name=
"encryption"
/>
</optional>
<optional>
<ref
name=
"initiatorinfo"
/>
</optional>
</element>
</define>
...
...
src/conf/domain_conf.c
浏览文件 @
9ea3fdc6
...
...
@@ -8853,6 +8853,8 @@ virDomainDiskSourceNetworkParse(xmlNodePtr node,
virStorageSourceNetworkAssignDefaultPorts(src);
virStorageSourceInitiatorParseXML(ctxt, &src->initiator);
ret = 0;
cleanup:
...
...
@@ -23568,6 +23570,8 @@ virDomainDiskSourceFormatNetwork(virBufferPtr attrBuf,
virBufferEscapeString(childBuf, "<snapshot name='%s'/>\n", src->snapshot);
virBufferEscapeString(childBuf, "<config file='%s'/>\n", src->configFile);
virStorageSourceInitiatorFormatXML(&src->initiator, childBuf);
return 0;
}
...
...
@@ -30194,6 +30198,12 @@ virDomainDiskTranslateISCSIDirect(virDomainDiskDefPtr def,
if (virDomainDiskAddISCSIPoolSourceHost(def, pooldef) < 0)
return -1;
if (!def->src->initiator.iqn && pooldef->source.initiator.iqn &&
virStorageSourceInitiatorCopy(&def->src->initiator,
&pooldef->source.initiator) < 0) {
return -1;
}
return 0;
}
...
...
src/util/virstoragefile.c
浏览文件 @
9ea3fdc6
...
...
@@ -2272,6 +2272,9 @@ virStorageSourceCopy(const virStorageSource *src,
!
(
ret
->
pr
=
virStoragePRDefCopy
(
src
->
pr
)))
goto
error
;
if
(
virStorageSourceInitiatorCopy
(
&
ret
->
initiator
,
&
src
->
initiator
))
goto
error
;
if
(
backingChain
&&
src
->
backingStore
)
{
if
(
!
(
ret
->
backingStore
=
virStorageSourceCopy
(
src
->
backingStore
,
true
)))
...
...
@@ -2503,6 +2506,8 @@ virStorageSourceClear(virStorageSourcePtr def)
VIR_FREE
(
def
->
tlsAlias
);
VIR_FREE
(
def
->
tlsCertdir
);
virStorageSourceInitiatorClear
(
&
def
->
initiator
);
memset
(
def
,
0
,
sizeof
(
*
def
));
}
...
...
src/util/virstoragefile.h
浏览文件 @
9ea3fdc6
...
...
@@ -261,6 +261,8 @@ struct _virStorageSource {
bool
encryptionInherited
;
virStoragePRDefPtr
pr
;
virStorageSourceInitiatorDef
initiator
;
virObjectPtr
privateData
;
int
format
;
/* virStorageFileFormat in domain backing chains, but
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录