aboutsummaryrefslogtreecommitdiff
path: root/include/block/blockjob.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-01-17 11:56:42 +0100
committerKevin Wolf <kwolf@redhat.com>2017-02-28 20:40:37 +0100
commit76d554e20bd0a965ac22d6155a129be12fac2667 (patch)
treedd9e34a6339d8cebb1c60a51782cb6ae84490dcd /include/block/blockjob.h
parent26de9438c1b6013532fb95de0720e2696588332f (diff)
blockjob: Add permissions to block_job_add_bdrv()
Block jobs don't actually do I/O through the the reference they create with block_job_add_bdrv(), but they might want to use the permisssion system to express what the block job does to intermediate nodes. This adds permissions to block_job_add_bdrv() to provide the means to request permissions. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include/block/blockjob.h')
-rw-r--r--include/block/blockjob.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/block/blockjob.h b/include/block/blockjob.h
index 1acb256223..9d65ef80b8 100644
--- a/include/block/blockjob.h
+++ b/include/block/blockjob.h
@@ -169,13 +169,16 @@ BlockJob *block_job_get(const char *id);
/**
* block_job_add_bdrv:
* @job: A block job
+ * @name: The name to assign to the new BdrvChild
* @bs: A BlockDriverState that is involved in @job
+ * @perm, @shared_perm: Permissions to request on the node
*
* Add @bs to the list of BlockDriverState that are involved in
* @job. This means that all operations will be blocked on @bs while
* @job exists.
*/
-void block_job_add_bdrv(BlockJob *job, BlockDriverState *bs);
+int block_job_add_bdrv(BlockJob *job, const char *name, BlockDriverState *bs,
+ uint64_t perm, uint64_t shared_perm, Error **errp);
/**
* block_job_set_speed: