diff options
author | Kevin Wolf | 2016-04-18 11:36:38 +0200 |
---|---|---|
committer | Kevin Wolf | 2016-05-19 16:45:31 +0200 |
commit | 81e254dc8349795d17c585a997f9076b77a863fc (patch) | |
tree | c3f3b3668627b4600426f46850282f856072b940 /block | |
parent | block: User BdrvChild callback for device name (diff) | |
download | qemu-81e254dc8349795d17c585a997f9076b77a863fc.tar.gz qemu-81e254dc8349795d17c585a997f9076b77a863fc.tar.xz qemu-81e254dc8349795d17c585a997f9076b77a863fc.zip |
blockjob: Don't set iostatus of target
When block job errors were introduced, we assigned the iostatus of the
target BDS "just in case". The field has never been accessible for the
user because the target isn't listed in query-block.
Before we can allow the user to have a second BlockBackend on the
target, we need to clean this up. If anything, we would want to set the
iostatus for the internal BB of the job (which we can always do later),
but certainly not for a separate BB which the job doesn't even use.
As a nice side effect, this gets us rid of another bs->blk use.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/backup.c | 8 | ||||
-rw-r--r-- | block/mirror.c | 8 | ||||
-rw-r--r-- | block/stream.c | 3 |
3 files changed, 9 insertions, 10 deletions
diff --git a/block/backup.c b/block/backup.c index 491fd14068..ef7609d744 100644 --- a/block/backup.c +++ b/block/backup.c @@ -272,11 +272,11 @@ static BlockErrorAction backup_error_action(BackupBlockJob *job, bool read, int error) { if (read) { - return block_job_error_action(&job->common, job->common.bs, - job->on_source_error, true, error); + return block_job_error_action(&job->common, job->on_source_error, + true, error); } else { - return block_job_error_action(&job->common, job->target, - job->on_target_error, false, error); + return block_job_error_action(&job->common, job->on_target_error, + false, error); } } diff --git a/block/mirror.c b/block/mirror.c index 039f48125e..c7f51ad094 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -80,11 +80,11 @@ static BlockErrorAction mirror_error_action(MirrorBlockJob *s, bool read, { s->synced = false; if (read) { - return block_job_error_action(&s->common, s->common.bs, - s->on_source_error, true, error); + return block_job_error_action(&s->common, s->on_source_error, + true, error); } else { - return block_job_error_action(&s->common, s->target, - s->on_target_error, false, error); + return block_job_error_action(&s->common, s->on_target_error, + false, error); } } diff --git a/block/stream.c b/block/stream.c index 332b9a183e..16c3e90021 100644 --- a/block/stream.c +++ b/block/stream.c @@ -163,8 +163,7 @@ wait: } if (ret < 0) { BlockErrorAction action = - block_job_error_action(&s->common, s->common.bs, s->on_error, - true, -ret); + block_job_error_action(&s->common, s->on_error, true, -ret); if (action == BLOCK_ERROR_ACTION_STOP) { n = 0; continue; |