diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2019-06-06 18:41:31 +0300 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-06-18 16:41:10 +0200 |
commit | 8164102ffe02dfc6478c0b3f8ffce29705a9a53b (patch) | |
tree | 2927ab69eb93dc66110ca00ce3486c6025b4b3ea /include/block | |
parent | 68d00e429395a273cf25827f89f036548fb67bdd (diff) |
blockdev: blockdev_mark_auto_del: drop usage of bs->job
We are going to remove bs->job pointer. Drop it's usage in
blockdev_mark_auto_del: instead of looking at bs->job let's check all
jobs for references to bs.
Suggested-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/blockjob.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h index ede0bd8dcb..35faa3aa26 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -122,6 +122,15 @@ int block_job_add_bdrv(BlockJob *job, const char *name, BlockDriverState *bs, void block_job_remove_all_bdrv(BlockJob *job); /** + * block_job_has_bdrv: + * @job: The block job + * + * Searches for @bs in the list of nodes that are involved in the + * job. + */ +bool block_job_has_bdrv(BlockJob *job, BlockDriverState *bs); + +/** * block_job_set_speed: * @job: The job to set the speed for. * @speed: The new value |