Blockjobs: documentation touchup

Trivial; Document what the job creation flags do,
and some general tidying.

Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
John Snow 2018-03-10 03:27:28 -05:00 committed by Kevin Wolf
parent 75859b9420
commit 62bfdf0ca1
2 changed files with 7 additions and 5 deletions

View File

@ -127,12 +127,10 @@ typedef struct BlockJob {
/** Reference count of the block job */ /** Reference count of the block job */
int refcnt; int refcnt;
/* True if this job has reported completion by calling block_job_completed. /** True when job has reported completion by calling block_job_completed. */
*/
bool completed; bool completed;
/* ret code passed to block_job_completed. /** ret code passed to block_job_completed. */
*/
int ret; int ret;
/** /**
@ -146,7 +144,9 @@ typedef struct BlockJob {
} BlockJob; } BlockJob;
typedef enum BlockJobCreateFlags { typedef enum BlockJobCreateFlags {
/* Default behavior */
BLOCK_JOB_DEFAULT = 0x00, BLOCK_JOB_DEFAULT = 0x00,
/* BlockJob is not QMP-created and should not send QMP events */
BLOCK_JOB_INTERNAL = 0x01, BLOCK_JOB_INTERNAL = 0x01,
} BlockJobCreateFlags; } BlockJobCreateFlags;

View File

@ -114,11 +114,13 @@ struct BlockJobDriver {
* block_job_create: * block_job_create:
* @job_id: The id of the newly-created job, or %NULL to have one * @job_id: The id of the newly-created job, or %NULL to have one
* generated automatically. * generated automatically.
* @job_type: The class object for the newly-created job. * @driver: The class object for the newly-created job.
* @txn: The transaction this job belongs to, if any. %NULL otherwise. * @txn: The transaction this job belongs to, if any. %NULL otherwise.
* @bs: The block * @bs: The block
* @perm, @shared_perm: Permissions to request for @bs * @perm, @shared_perm: Permissions to request for @bs
* @speed: The maximum speed, in bytes per second, or 0 for unlimited. * @speed: The maximum speed, in bytes per second, or 0 for unlimited.
* @flags: Creation flags for the Block Job.
* See @BlockJobCreateFlags
* @cb: Completion function for the job. * @cb: Completion function for the job.
* @opaque: Opaque pointer value passed to @cb. * @opaque: Opaque pointer value passed to @cb.
* @errp: Error object. * @errp: Error object.