From 66a0fae438d2888f3b06cd7bd2795bb226956c05 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Mon, 18 Apr 2016 15:14:11 +0200 Subject: blockjob: Don't touch BDS iostatus Block jobs don't actually make use of the iostatus for their BDSes, but they manage a separate block job iostatus. Still, they require that it is enabled for the source BDS and they enable it automatically for the target and set the error handling mode - which ends up never being used by the job. This patch removes all of the BDS iostatus handling from the block job, which removes another few bs->blk accesses. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz --- block/commit.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'block/commit.c') diff --git a/block/commit.c b/block/commit.c index cba0e8c1e8..f308c8c6f0 100644 --- a/block/commit.c +++ b/block/commit.c @@ -214,13 +214,6 @@ void commit_start(BlockDriverState *bs, BlockDriverState *base, BlockDriverState *overlay_bs; Error *local_err = NULL; - if ((on_error == BLOCKDEV_ON_ERROR_STOP || - on_error == BLOCKDEV_ON_ERROR_ENOSPC) && - (!bs->blk || !blk_iostatus_is_enabled(bs->blk))) { - error_setg(errp, "Invalid parameter combination"); - return; - } - assert(top != bs); if (top == base) { error_setg(errp, "Invalid files for merge: top and base are the same"); -- cgit v1.2.3-55-g7522