mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
blockjob: Implement block_job_set_speed() centrally
All block job drivers support .set_speed and all of them duplicate the same code to implement it. Move that code to blockjob.c and remove the now useless callback. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com>
This commit is contained in:
parent
f05fee508f
commit
18bb69287e
7 changed files with 12 additions and 72 deletions
|
@ -29,6 +29,8 @@
|
|||
#include "block/block.h"
|
||||
#include "qemu/ratelimit.h"
|
||||
|
||||
#define BLOCK_JOB_SLICE_TIME 100000000ULL /* ns */
|
||||
|
||||
typedef struct BlockJobDriver BlockJobDriver;
|
||||
typedef struct BlockJobTxn BlockJobTxn;
|
||||
|
||||
|
|
|
@ -41,9 +41,6 @@ struct BlockJobDriver {
|
|||
/** String describing the operation, part of query-block-jobs QMP API */
|
||||
BlockJobType job_type;
|
||||
|
||||
/** Optional callback for job types that support setting a speed limit */
|
||||
void (*set_speed)(BlockJob *job, int64_t speed, Error **errp);
|
||||
|
||||
/** Mandatory: Entrypoint for the Coroutine. */
|
||||
CoroutineEntry *start;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue