diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/block/blockjob.h | 11 | ||||
-rw-r--r-- | include/block/blockjob_int.h | 7 |
2 files changed, 18 insertions, 0 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 058b0c8..95854f1 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -173,6 +173,17 @@ bool block_job_has_bdrv(BlockJob *job, BlockDriverState *bs); bool block_job_set_speed_locked(BlockJob *job, int64_t speed, Error **errp); /** + * block_job_change_locked: + * @job: The job to change. + * @opts: The new options. + * @errp: Error object. + * + * Change the job according to opts. + */ +void block_job_change_locked(BlockJob *job, BlockJobChangeOptions *opts, + Error **errp); + +/** * block_job_query_locked: * @job: The job to get information about. * diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 1048240..a4656d4 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -67,6 +67,13 @@ struct BlockJobDriver { void (*attached_aio_context)(BlockJob *job, AioContext *new_context); void (*set_speed)(BlockJob *job, int64_t speed); + + /* + * Change the @job's options according to @opts. + * + * Note that this can already be called before the job coroutine is running. + */ + void (*change)(BlockJob *job, BlockJobChangeOptions *opts, Error **errp); }; /* |