blockjob: rename BlockJobType to BlockJobDriver

We will use BlockJobType as the enum type name of block jobs in QAPI,
rename current BlockJobType to BlockJobDriver, which will eventually
become a set of operations, similar to block drivers.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Fam Zheng 2013-10-08 17:29:38 +08:00 committed by Kevin Wolf
parent 39c153b80f
commit 3fc4b10af0
6 changed files with 25 additions and 25 deletions

View file

@ -28,11 +28,11 @@
#include "block/block.h"
/**
* BlockJobType:
* BlockJobDriver:
*
* A class type for block job objects.
* A class type for block job driver.
*/
typedef struct BlockJobType {
typedef struct BlockJobDriver {
/** Derived BlockJob struct size */
size_t instance_size;
@ -50,7 +50,7 @@ typedef struct BlockJobType {
* manually.
*/
void (*complete)(BlockJob *job, Error **errp);
} BlockJobType;
} BlockJobDriver;
/**
* BlockJob:
@ -59,7 +59,7 @@ typedef struct BlockJobType {
*/
struct BlockJob {
/** The job type, including the job vtable. */
const BlockJobType *job_type;
const BlockJobDriver *driver;
/** The block device on which the job is operating. */
BlockDriverState *bs;
@ -128,7 +128,7 @@ struct BlockJob {
* This function is not part of the public job interface; it should be
* called from a wrapper that is specific to the job type.
*/
void *block_job_create(const BlockJobType *job_type, BlockDriverState *bs,
void *block_job_create(const BlockJobDriver *driver, BlockDriverState *bs,
int64_t speed, BlockDriverCompletionFunc *cb,
void *opaque, Error **errp);