diff options
author | Max Reitz <mreitz@redhat.com> | 2015-10-19 17:53:22 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-10-23 18:18:23 +0200 |
commit | 373340b26caa1572cf0f155131569dfc527aa133 (patch) | |
tree | fe453b08000c1d5c59402c0e74c675825c0335be /blockjob.c | |
parent | 7f0e9da6f134c5303be51333696e1ff54697f3e0 (diff) | |
download | qemu-373340b26caa1572cf0f155131569dfc527aa133.zip qemu-373340b26caa1572cf0f155131569dfc527aa133.tar.gz qemu-373340b26caa1572cf0f155131569dfc527aa133.tar.bz2 |
block: Move I/O status and error actions into BB
These options are only relevant for the user of a whole BDS tree (like a
guest device or a block job) and should thus be moved into the
BlockBackend.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockjob.c')
-rw-r--r-- | blockjob.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -29,6 +29,7 @@ #include "block/block.h" #include "block/blockjob.h" #include "block/block_int.h" +#include "sysemu/block-backend.h" #include "qapi/qmp/qerror.h" #include "qapi/qmp/qjson.h" #include "qemu/coroutine.h" @@ -354,8 +355,8 @@ BlockErrorAction block_job_error_action(BlockJob *job, BlockDriverState *bs, job->user_paused = true; block_job_pause(job); block_job_iostatus_set_err(job, error); - if (bs != job->bs) { - bdrv_iostatus_set_err(bs, error); + if (bs->blk && bs != job->bs) { + blk_iostatus_set_err(bs->blk, error); } } return action; |