Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
90feb02d
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看板
提交
90feb02d
编写于
7月 19, 2011
作者:
J
Jiri Denemark
提交者:
Eric Blake
7月 27, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Remove special case for virDomainBlockStats
Like other query commands, this can now be called directly during migration.
上级
fb3cada0
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
58 deletion
+18
-58
src/qemu/qemu_domain.h
src/qemu/qemu_domain.h
+0
-4
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+18
-36
src/qemu/qemu_migration.c
src/qemu/qemu_migration.c
+0
-18
未找到文件。
src/qemu/qemu_domain.h
浏览文件 @
90feb02d
...
...
@@ -76,15 +76,11 @@ enum qemuDomainJobSignals {
QEMU_JOB_SIGNAL_SUSPEND
=
1
<<
1
,
/* Request VM suspend to finish live migration offline */
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 */
};
struct
qemuDomainJobSignalsData
{
unsigned
long
long
migrateDowntime
;
/* Data for QEMU_JOB_SIGNAL_MIGRATE_DOWNTIME */
unsigned
long
migrateBandwidth
;
/* Data for QEMU_JOB_SIGNAL_MIGRATE_SPEED */
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 */
};
struct
qemuDomainJobObj
{
...
...
src/qemu/qemu_driver.c
浏览文件 @
90feb02d
...
...
@@ -6634,46 +6634,28 @@ qemudDomainBlockStats (virDomainPtr dom,
}
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_BLKSTAT
)
ignore_value
(
virCondWait
(
&
priv
->
job
.
signalCond
,
&
vm
->
lock
));
priv
->
job
.
signalsData
.
statDevName
=
disk
->
info
.
alias
;
priv
->
job
.
signalsData
.
blockStat
=
stats
;
priv
->
job
.
signalsData
.
statRetCode
=
&
ret
;
priv
->
job
.
signals
|=
QEMU_JOB_SIGNAL_BLKSTAT
;
while
(
priv
->
job
.
signals
&
QEMU_JOB_SIGNAL_BLKSTAT
)
ignore_value
(
virCondWait
(
&
priv
->
job
.
signalCond
,
&
vm
->
lock
));
if
(
virDomainObjUnref
(
vm
)
==
0
)
vm
=
NULL
;
}
else
{
if
(
qemuDomainObjBeginJob
(
driver
,
vm
,
QEMU_JOB_QUERY
)
<
0
)
goto
cleanup
;
if
(
qemuDomainObjBeginJob
(
driver
,
vm
,
QEMU_JOB_QUERY
)
<
0
)
goto
cleanup
;
if
(
!
virDomainObjIsActive
(
vm
))
{
qemuReportError
(
VIR_ERR_OPERATION_INVALID
,
"%s"
,
_
(
"domain is not running"
));
goto
endjob
;
}
if
(
!
virDomainObjIsActive
(
vm
))
{
qemuReportError
(
VIR_ERR_OPERATION_INVALID
,
"%s"
,
_
(
"domain is not running"
));
goto
endjob
;
}
ignore_value
(
qemuDomainObjEnterMonitor
(
driver
,
vm
));
ret
=
qemuMonitorGetBlockStatsInfo
(
priv
->
mon
,
disk
->
info
.
alias
,
&
stats
->
rd_req
,
&
stats
->
rd_bytes
,
&
stats
->
wr_req
,
&
stats
->
wr_bytes
,
&
stats
->
errs
);
qemuDomainObjExitMonitor
(
driver
,
vm
);
ignore_value
(
qemuDomainObjEnterMonitor
(
driver
,
vm
));
ret
=
qemuMonitorGetBlockStatsInfo
(
priv
->
mon
,
disk
->
info
.
alias
,
&
stats
->
rd_req
,
&
stats
->
rd_bytes
,
&
stats
->
wr_req
,
&
stats
->
wr_bytes
,
&
stats
->
errs
);
qemuDomainObjExitMonitor
(
driver
,
vm
);
endjob:
if
(
qemuDomainObjEndJob
(
driver
,
vm
)
==
0
)
vm
=
NULL
;
}
if
(
qemuDomainObjEndJob
(
driver
,
vm
)
==
0
)
vm
=
NULL
;
cleanup:
if
(
vm
)
...
...
src/qemu/qemu_migration.c
浏览文件 @
90feb02d
...
...
@@ -801,24 +801,6 @@ qemuMigrationProcessJobSignals(struct qemud_driver *driver,
}
if
(
ret
<
0
)
VIR_WARN
(
"Unable to set migration speed"
);
}
else
if
(
priv
->
job
.
signals
&
QEMU_JOB_SIGNAL_BLKSTAT
)
{
ret
=
qemuDomainObjEnterMonitorWithDriver
(
driver
,
vm
);
if
(
ret
==
0
)
{
ret
=
qemuMonitorGetBlockStatsInfo
(
priv
->
mon
,
priv
->
job
.
signalsData
.
statDevName
,
&
priv
->
job
.
signalsData
.
blockStat
->
rd_req
,
&
priv
->
job
.
signalsData
.
blockStat
->
rd_bytes
,
&
priv
->
job
.
signalsData
.
blockStat
->
wr_req
,
&
priv
->
job
.
signalsData
.
blockStat
->
wr_bytes
,
&
priv
->
job
.
signalsData
.
blockStat
->
errs
);
qemuDomainObjExitMonitorWithDriver
(
driver
,
vm
);
}
*
priv
->
job
.
signalsData
.
statRetCode
=
ret
;
priv
->
job
.
signals
^=
QEMU_JOB_SIGNAL_BLKSTAT
;
if
(
ret
<
0
)
VIR_WARN
(
"Unable to get block statistics"
);
}
else
{
ret
=
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录