diff options
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/blockjob.h | 21 | ||||
-rw-r--r-- | include/block/blockjob_int.h | 7 |
2 files changed, 7 insertions, 21 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h index 01cdee6d15..087e7820f5 100644 --- a/include/block/blockjob.h +++ b/include/block/blockjob.h @@ -132,9 +132,6 @@ typedef struct BlockJob { /** The opaque value that is passed to the completion function. */ void *opaque; - /** Reference count of the block job */ - int refcnt; - /** True when job has reported completion by calling block_job_completed. */ bool completed; @@ -400,24 +397,6 @@ void block_job_iostatus_reset(BlockJob *job); BlockJobTxn *block_job_txn_new(void); /** - * block_job_ref: - * - * Add a reference to BlockJob refcnt, it will be decreased with - * block_job_unref, and then be freed if it comes to be the last - * reference. - */ -void block_job_ref(BlockJob *job); - -/** - * block_job_unref: - * - * Release a reference that was previously acquired with block_job_ref - * or block_job_create. If it's the last reference to the object, it will be - * freed. - */ -void block_job_unref(BlockJob *job); - -/** * block_job_txn_unref: * * Release a reference that was previously acquired with block_job_txn_add_job diff --git a/include/block/blockjob_int.h b/include/block/blockjob_int.h index 1e62d6dd30..6f0fe3c48d 100644 --- a/include/block/blockjob_int.h +++ b/include/block/blockjob_int.h @@ -144,6 +144,13 @@ void *block_job_create(const char *job_id, const BlockJobDriver *driver, BlockCompletionFunc *cb, void *opaque, Error **errp); /** + * block_job_free: + * Callback to be used for JobDriver.free in all block jobs. Frees block job + * specific resources in @job. + */ +void block_job_free(Job *job); + +/** * block_job_sleep_ns: * @job: The job that calls the function. * @ns: How many nanoseconds to stop for. |