Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
fb3cada0
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看板
提交
fb3cada0
编写于
7月 19, 2011
作者:
J
Jiri Denemark
提交者:
Eric Blake
7月 27, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Remove special case for virDomainGetBlockInfo
Like other query commands, this can now be called directly during migration.
上级
9cfd2197
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
12 addition
and
48 deletion
+12
-48
src/qemu/qemu_domain.h
src/qemu/qemu_domain.h
+0
-4
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+12
-30
src/qemu/qemu_migration.c
src/qemu/qemu_migration.c
+0
-14
未找到文件。
src/qemu/qemu_domain.h
浏览文件 @
fb3cada0
...
...
@@ -77,7 +77,6 @@ enum qemuDomainJobSignals {
QEMU_JOB_SIGNAL_MIGRATE_DOWNTIME
=
1
<<
2
,
/* Request migration downtime change */
QEMU_JOB_SIGNAL_MIGRATE_SPEED
=
1
<<
3
,
/* Request migration speed change */
QEMU_JOB_SIGNAL_BLKSTAT
=
1
<<
4
,
/* Request blkstat during migration */
QEMU_JOB_SIGNAL_BLKINFO
=
1
<<
5
,
/* Request blkinfo during migration */
};
struct
qemuDomainJobSignalsData
{
...
...
@@ -86,9 +85,6 @@ struct qemuDomainJobSignalsData {
char
*
statDevName
;
/* Device name used by blkstat calls */
virDomainBlockStatsPtr
blockStat
;
/* Block statistics for QEMU_JOB_SIGNAL_BLKSTAT */
int
*
statRetCode
;
/* Return code for the blkstat calls */
char
*
infoDevName
;
/* Device name used by blkinfo calls */
virDomainBlockInfoPtr
blockInfo
;
/* Block information for QEMU_JOB_SIGNAL_BLKINFO */
int
*
infoRetCode
;
/* Return code for the blkinfo calls */
};
struct
qemuDomainJobObj
{
...
...
src/qemu/qemu_driver.c
浏览文件 @
fb3cada0
...
...
@@ -7088,39 +7088,21 @@ static int qemuDomainGetBlockInfo(virDomainPtr dom,
virDomainObjIsActive
(
vm
))
{
qemuDomainObjPrivatePtr
priv
=
vm
->
privateData
;
if
((
priv
->
job
.
asyncJob
==
QEMU_ASYNC_JOB_MIGRATION_OUT
)
||
(
priv
->
job
.
asyncJob
==
QEMU_ASYNC_JOB_SAVE
))
{
virDomainObjRef
(
vm
);
while
(
priv
->
job
.
signals
&
QEMU_JOB_SIGNAL_BLKINFO
)
ignore_value
(
virCondWait
(
&
priv
->
job
.
signalCond
,
&
vm
->
lock
));
priv
->
job
.
signalsData
.
infoDevName
=
disk
->
info
.
alias
;
priv
->
job
.
signalsData
.
blockInfo
=
info
;
priv
->
job
.
signalsData
.
infoRetCode
=
&
ret
;
priv
->
job
.
signals
|=
QEMU_JOB_SIGNAL_BLKINFO
;
while
(
priv
->
job
.
signals
&
QEMU_JOB_SIGNAL_BLKINFO
)
ignore_value
(
virCondWait
(
&
priv
->
job
.
signalCond
,
&
vm
->
lock
));
if
(
qemuDomainObjBeginJob
(
driver
,
vm
,
QEMU_JOB_QUERY
)
<
0
)
goto
cleanup
;
if
(
virDomainObjUnref
(
vm
)
==
0
)
vm
=
NULL
;
if
(
virDomainObjIsActive
(
vm
))
{
ignore_value
(
qemuDomainObjEnterMonitor
(
driver
,
vm
));
ret
=
qemuMonitorGetBlockExtent
(
priv
->
mon
,
disk
->
info
.
alias
,
&
info
->
allocation
);
qemuDomainObjExitMonitor
(
driver
,
vm
);
}
else
{
if
(
qemuDomainObjBeginJob
(
driver
,
vm
,
QEMU_JOB_QUERY
)
<
0
)
goto
cleanup
;
if
(
virDomainObjIsActive
(
vm
))
{
ignore_value
(
qemuDomainObjEnterMonitor
(
driver
,
vm
));
ret
=
qemuMonitorGetBlockExtent
(
priv
->
mon
,
disk
->
info
.
alias
,
&
info
->
allocation
);
qemuDomainObjExitMonitor
(
driver
,
vm
);
}
else
{
ret
=
0
;
}
if
(
qemuDomainObjEndJob
(
driver
,
vm
)
==
0
)
vm
=
NULL
;
ret
=
0
;
}
if
(
qemuDomainObjEndJob
(
driver
,
vm
)
==
0
)
vm
=
NULL
;
}
else
{
ret
=
0
;
}
...
...
src/qemu/qemu_migration.c
浏览文件 @
fb3cada0
...
...
@@ -819,20 +819,6 @@ qemuMigrationProcessJobSignals(struct qemud_driver *driver,
if
(
ret
<
0
)
VIR_WARN
(
"Unable to get block statistics"
);
}
else
if
(
priv
->
job
.
signals
&
QEMU_JOB_SIGNAL_BLKINFO
)
{
ret
=
qemuDomainObjEnterMonitorWithDriver
(
driver
,
vm
);
if
(
ret
==
0
)
{
ret
=
qemuMonitorGetBlockExtent
(
priv
->
mon
,
priv
->
job
.
signalsData
.
infoDevName
,
&
priv
->
job
.
signalsData
.
blockInfo
->
allocation
);
qemuDomainObjExitMonitorWithDriver
(
driver
,
vm
);
}
*
priv
->
job
.
signalsData
.
infoRetCode
=
ret
;
priv
->
job
.
signals
^=
QEMU_JOB_SIGNAL_BLKINFO
;
if
(
ret
<
0
)
VIR_WARN
(
"Unable to get block information"
);
}
else
{
ret
=
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录