fix #1420: fix stop mode backup with virtio-blk
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
ab8770fa38
commit
027092309e
@ -105,7 +105,17 @@ index 1ede70c061..51b5ba6eda 100644
|
|||||||
assert(s->target);
|
assert(s->target);
|
||||||
blk_unref(s->target);
|
blk_unref(s->target);
|
||||||
s->target = NULL;
|
s->target = NULL;
|
||||||
@@ -330,9 +344,11 @@ static BlockErrorAction backup_error_action(BackupBlockJob *job,
|
@@ -255,7 +269,8 @@ static void backup_attached_aio_context(BlockJob *job, AioContext *aio_context)
|
||||||
|
{
|
||||||
|
BackupBlockJob *s = container_of(job, BackupBlockJob, common);
|
||||||
|
|
||||||
|
- blk_set_aio_context(s->target, aio_context);
|
||||||
|
+ if (s->target)
|
||||||
|
+ blk_set_aio_context(s->target, aio_context);
|
||||||
|
}
|
||||||
|
|
||||||
|
void backup_do_checkpoint(BlockJob *job, Error **errp)
|
||||||
|
@@ -330,9 +345,11 @@ static BlockErrorAction backup_error_action(BackupBlockJob *job,
|
||||||
if (read) {
|
if (read) {
|
||||||
return block_job_error_action(&job->common, job->on_source_error,
|
return block_job_error_action(&job->common, job->on_source_error,
|
||||||
true, error);
|
true, error);
|
||||||
|
Loading…
Reference in New Issue
Block a user