summaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorJohn Snow <jsnow@redhat.com>2016-10-27 12:06:55 -0400
committerJeff Cody <jcody@redhat.com>2016-11-01 07:55:57 -0400
commit559b935f8c5c3139c2e275651da719ffa425cc14 (patch)
tree5d84cd5adcdf2c4cae14b925510b45d57202c6d0 /include/block
parent53d9837fb8906b8512143d5eaacc4d6a65b29cc6 (diff)
downloadqemu-559b935f8c5c3139c2e275651da719ffa425cc14.zip
blockjobs: hide internal jobs from management API
If jobs are not created directly by the user, do not allow them to be seen by the user/management utility. At the moment, 'internal' jobs are those that do not have an ID. As of this patch it is impossible to create such jobs. Signed-off-by: John Snow <jsnow@redhat.com> Message-id: 1477584421-1399-2-git-send-email-jsnow@redhat.com Signed-off-by: Jeff Cody <jcody@redhat.com>
Diffstat (limited to 'include/block')
-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 4dfb16b43f..a1b75022c3 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -114,7 +114,7 @@ struct BlockJob {
BlockBackend *blk;
/**
- * The ID of the block job.
+ * The ID of the block job. May be NULL for internal jobs.
*/
char *id;
@@ -354,7 +354,7 @@ bool block_job_is_cancelled(BlockJob *job);
*
* Return information about a job.
*/
-BlockJobInfo *block_job_query(BlockJob *job);
+BlockJobInfo *block_job_query(BlockJob *job, Error **errp);
/**
* block_job_pause_point:
@@ -525,4 +525,12 @@ void block_job_txn_unref(BlockJobTxn *txn);
*/
void block_job_txn_add_job(BlockJobTxn *txn, BlockJob *job);
+/**
+ * block_job_is_internal:
+ * @job: The job to determine if it is user-visible or not.
+ *
+ * Returns true if the job should not be visible to the management layer.
+ */
+bool block_job_is_internal(BlockJob *job);
+
#endif