From 981776b34875ef75b218a338e1831b8fc65ea6bd Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Fri, 20 Jan 2017 15:42:39 +0100 Subject: block: Add permissions to BlockBackend The BlockBackend can now store the permissions that its user requires. This is necessary because nodes can be ejected from or inserted into a BlockBackend and all of these operations must make sure that the user still gets what it requested initially. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Acked-by: Fam Zheng --- include/sysemu/block-backend.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h index f365a51acf..4a18e86b85 100644 --- a/include/sysemu/block-backend.h +++ b/include/sysemu/block-backend.h @@ -105,6 +105,8 @@ void blk_remove_bs(BlockBackend *blk); void blk_insert_bs(BlockBackend *blk, BlockDriverState *bs); bool bdrv_has_blk(BlockDriverState *bs); bool bdrv_is_root_node(BlockDriverState *bs); +int blk_set_perm(BlockBackend *blk, uint64_t perm, uint64_t shared_perm, + Error **errp); void blk_set_allow_write_beyond_eof(BlockBackend *blk, bool allow); void blk_iostatus_enable(BlockBackend *blk); -- cgit v1.2.3