mirror of https://github.com/xemu-project/xemu.git
monitor: add missed aio_context_acquire into vm_completion call
Signed-off-by: Denis V. Lunev <den@openvz.org> CC: Stefan Hajnoczi <stefanha@redhat.com> CC: Kevin Wolf <kwolf@redhat.com> CC: Luiz Capitulino <lcapitulino@redhat.com> CC: Markus Armbruster <armbru@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fbe3fc5cb3
commit
6bf1faa848
13
monitor.c
13
monitor.c
|
@ -3408,13 +3408,18 @@ static void vm_completion(ReadLineState *rs, const char *str)
|
||||||
readline_set_completion_index(rs, len);
|
readline_set_completion_index(rs, len);
|
||||||
while ((bs = bdrv_next(bs))) {
|
while ((bs = bdrv_next(bs))) {
|
||||||
SnapshotInfoList *snapshots, *snapshot;
|
SnapshotInfoList *snapshots, *snapshot;
|
||||||
|
AioContext *ctx = bdrv_get_aio_context(bs);
|
||||||
|
bool ok = false;
|
||||||
|
|
||||||
if (!bdrv_can_snapshot(bs)) {
|
aio_context_acquire(ctx);
|
||||||
continue;
|
if (bdrv_can_snapshot(bs)) {
|
||||||
}
|
ok = bdrv_query_snapshot_info_list(bs, &snapshots, NULL) == 0;
|
||||||
if (bdrv_query_snapshot_info_list(bs, &snapshots, NULL)) {
|
}
|
||||||
|
aio_context_release(ctx);
|
||||||
|
if (!ok) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
snapshot = snapshots;
|
snapshot = snapshots;
|
||||||
while (snapshot) {
|
while (snapshot) {
|
||||||
char *completion = snapshot->value->name;
|
char *completion = snapshot->value->name;
|
||||||
|
|
Loading…
Reference in New Issue