aboutsummaryrefslogtreecommitdiff
path: root/include/block/blockjob.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/block/blockjob.h')
-rw-r--r--include/block/blockjob.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 978274ed2b..fc645dac68 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -63,6 +63,12 @@ typedef struct BlockJob {
bool cancelled;
/**
+ * Set to true if the job should abort immediately without waiting
+ * for data to be in sync.
+ */
+ bool force;
+
+ /**
* Counter for pause request. If non-zero, the block job is either paused,
* or if busy == true will pause itself as soon as possible.
*/
@@ -230,10 +236,11 @@ void block_job_start(BlockJob *job);
/**
* block_job_cancel:
* @job: The job to be canceled.
+ * @force: Quit a job without waiting for data to be in sync.
*
* Asynchronously cancel the specified job.
*/
-void block_job_cancel(BlockJob *job);
+void block_job_cancel(BlockJob *job, bool force);
/**
* block_job_complete:
@@ -307,11 +314,12 @@ void block_job_user_resume(BlockJob *job, Error **errp);
/**
* block_job_user_cancel:
* @job: The job to be cancelled.
+ * @force: Quit a job without waiting for data to be in sync.
*
* Cancels the specified job, but may refuse to do so if the
* operation isn't currently meaningful.
*/
-void block_job_user_cancel(BlockJob *job, Error **errp);
+void block_job_user_cancel(BlockJob *job, bool force, Error **errp);
/**
* block_job_cancel_sync: