From 68d00e429395a273cf25827f89f036548fb67bdd Mon Sep 17 00:00:00 2001 From: Vladimir Sementsov-Ogievskiy Date: Thu, 6 Jun 2019 18:41:30 +0300 Subject: block/block-backend: blk_iostatus_reset: drop usage of bs->job We are going to remove bs->job pointer. Drop it's usage in blk_iostatus_reset. blk_iostatus_reset() has only two callers: 1. blk_attach_dev(). This doesn't have anything to do with jobs and attaching a new guest device won't solve any problem the job encountered, so no reason to reset the iostatus for the job. 2. qmp_cont(). This resets the iostatus for everything. We can just call block_job_iostatus_reset() for all block jobs instead of going through BlockBackend. Suggested-by: Kevin Wolf Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Kevin Wolf --- block/block-backend.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'block') diff --git a/block/block-backend.c b/block/block-backend.c index f5d9407d20..a8d160fd5d 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -1073,11 +1073,7 @@ void blk_iostatus_disable(BlockBackend *blk) void blk_iostatus_reset(BlockBackend *blk) { if (blk_iostatus_is_enabled(blk)) { - BlockDriverState *bs = blk_bs(blk); blk->iostatus = BLOCK_DEVICE_IO_STATUS_OK; - if (bs && bs->job) { - block_job_iostatus_reset(bs->job); - } } } -- cgit v1.2.3