Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
81738cd0
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看板
提交
81738cd0
编写于
2月 18, 2013
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
storage: move qemu-img options before positional arguments
Modify the expected output of storagevolxml2argv tests as well.
上级
56e1b4c3
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
18 addition
and
19 deletion
+18
-19
src/storage/storage_backend.c
src/storage/storage_backend.c
+10
-11
tests/storagevolxml2argvdata/qcow2-flag.argv
tests/storagevolxml2argvdata/qcow2-flag.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv
.../storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-nobacking-convert-none.argv
.../storagevolxml2argvdata/qcow2-nobacking-convert-none.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv
...ragevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-nobacking-flag.argv
tests/storagevolxml2argvdata/qcow2-nobacking-flag.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-nobacking-none.argv
tests/storagevolxml2argvdata/qcow2-nobacking-none.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv
tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv
+1
-1
tests/storagevolxml2argvdata/qcow2-none.argv
tests/storagevolxml2argvdata/qcow2-none.argv
+1
-1
未找到文件。
src/storage/storage_backend.c
浏览文件 @
81738cd0
...
...
@@ -773,8 +773,7 @@ virStorageBackendCreateQemuImgCmd(virConnectPtr conn,
cmd
=
virCommandNew
(
create_tool
);
if
(
inputvol
)
{
virCommandAddArgList
(
cmd
,
"convert"
,
"-f"
,
inputType
,
"-O"
,
type
,
inputPath
,
vol
->
target
.
path
,
NULL
);
virCommandAddArgList
(
cmd
,
"convert"
,
"-f"
,
inputType
,
"-O"
,
type
,
NULL
);
if
(
imgformat
==
QEMU_IMG_BACKING_FORMAT_OPTIONS
&&
(
do_encryption
||
preallocate
))
{
...
...
@@ -785,18 +784,18 @@ virStorageBackendCreateQemuImgCmd(virConnectPtr conn,
}
else
if
(
do_encryption
)
{
virCommandAddArg
(
cmd
,
"-e"
);
}
virCommandAddArgList
(
cmd
,
inputPath
,
vol
->
target
.
path
,
NULL
);
}
else
if
(
vol
->
backingStore
.
path
)
{
virCommandAddArgList
(
cmd
,
"create"
,
"-f"
,
type
,
"-b"
,
vol
->
backingStore
.
path
,
NULL
);
switch
(
imgformat
)
{
case
QEMU_IMG_BACKING_FORMAT_FLAG
:
virCommandAddArgList
(
cmd
,
"-F"
,
backingType
,
vol
->
target
.
path
,
NULL
);
virCommandAddArgFormat
(
cmd
,
"%lluK"
,
size_arg
);
virCommandAddArgList
(
cmd
,
"-F"
,
backingType
,
NULL
);
if
(
do_encryption
)
virCommandAddArg
(
cmd
,
"-e"
);
virCommandAddArg
(
cmd
,
vol
->
target
.
path
);
virCommandAddArgFormat
(
cmd
,
"%lluK"
,
size_arg
);
break
;
case
QEMU_IMG_BACKING_FORMAT_OPTIONS
:
...
...
@@ -811,15 +810,13 @@ virStorageBackendCreateQemuImgCmd(virConnectPtr conn,
VIR_INFO
(
"Unable to set backing store format for %s with %s"
,
vol
->
target
.
path
,
create_tool
);
virCommandAddArg
(
cmd
,
vol
->
target
.
path
);
virCommandAddArgFormat
(
cmd
,
"%lluK"
,
size_arg
);
if
(
do_encryption
)
virCommandAddArg
(
cmd
,
"-e"
);
virCommandAddArg
(
cmd
,
vol
->
target
.
path
);
virCommandAddArgFormat
(
cmd
,
"%lluK"
,
size_arg
);
}
}
else
{
virCommandAddArgList
(
cmd
,
"create"
,
"-f"
,
type
,
vol
->
target
.
path
,
NULL
);
virCommandAddArgFormat
(
cmd
,
"%lluK"
,
size_arg
);
virCommandAddArgList
(
cmd
,
"create"
,
"-f"
,
type
,
NULL
);
if
(
imgformat
==
QEMU_IMG_BACKING_FORMAT_OPTIONS
&&
(
do_encryption
||
preallocate
))
{
...
...
@@ -830,6 +827,8 @@ virStorageBackendCreateQemuImgCmd(virConnectPtr conn,
}
else
if
(
do_encryption
)
{
virCommandAddArg
(
cmd
,
"-e"
);
}
virCommandAddArg
(
cmd
,
vol
->
target
.
path
);
virCommandAddArgFormat
(
cmd
,
"%lluK"
,
size_arg
);
}
return
cmd
;
...
...
tests/storagevolxml2argvdata/qcow2-flag.argv
浏览文件 @
81738cd0
qemu-img create -f qcow2 -b /dev/null -F raw
/var/lib/libvirt/images/OtherDemo.img 5242880K -e
qemu-img create -f qcow2 -b /dev/null -F raw
-e /var/lib/libvirt/images/OtherDemo.img 5242880K
tests/storagevolxml2argvdata/qcow2-nobacking-convert-flag.argv
浏览文件 @
81738cd0
qemu-img convert -f raw -O qcow2
/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img -e
qemu-img convert -f raw -O qcow2
-e /var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img
tests/storagevolxml2argvdata/qcow2-nobacking-convert-none.argv
浏览文件 @
81738cd0
qemu-img convert -f raw -O qcow2
/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img -e
qemu-img convert -f raw -O qcow2
-e /var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img
tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc.argv
浏览文件 @
81738cd0
qemu-img convert -f raw -O qcow2
/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img -o encryption=on,preallocation=metadata
qemu-img convert -f raw -O qcow2
-o encryption=on,preallocation=metadata /var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img
tests/storagevolxml2argvdata/qcow2-nobacking-flag.argv
浏览文件 @
81738cd0
qemu-img create -f qcow2
/var/lib/libvirt/images/OtherDemo.img 5242880K -e
qemu-img create -f qcow2
-e /var/lib/libvirt/images/OtherDemo.img 5242880K
tests/storagevolxml2argvdata/qcow2-nobacking-none.argv
浏览文件 @
81738cd0
qemu-img create -f qcow2
/var/lib/libvirt/images/OtherDemo.img 5242880K -e
qemu-img create -f qcow2
-e /var/lib/libvirt/images/OtherDemo.img 5242880K
tests/storagevolxml2argvdata/qcow2-nobacking-prealloc.argv
浏览文件 @
81738cd0
qemu-img create -f qcow2
/var/lib/libvirt/images/OtherDemo.img 5242880K -o encryption=on,preallocation=metadata
qemu-img create -f qcow2
-o encryption=on,preallocation=metadata /var/lib/libvirt/images/OtherDemo.img 5242880K
tests/storagevolxml2argvdata/qcow2-none.argv
浏览文件 @
81738cd0
qemu-img create -f qcow2 -b /dev/null
/var/lib/libvirt/images/OtherDemo.img 5242880K -e
qemu-img create -f qcow2 -b /dev/null
-e /var/lib/libvirt/images/OtherDemo.img 5242880K
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录