From 76d554e20bd0a965ac22d6155a129be12fac2667 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 17 Jan 2017 11:56:42 +0100 Subject: 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 Reviewed-by: Max Reitz Acked-by: Fam Zheng --- block/stream.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'block/stream.c') diff --git a/block/stream.c b/block/stream.c index 7f49279..ba8650f 100644 --- a/block/stream.c +++ b/block/stream.c @@ -248,7 +248,9 @@ void stream_start(const char *job_id, BlockDriverState *bs, /* Block all intermediate nodes between bs and base, because they * will disappear from the chain after this operation */ for (iter = backing_bs(bs); iter && iter != base; iter = backing_bs(iter)) { - block_job_add_bdrv(&s->common, iter); + /* FIXME Use real permissions */ + block_job_add_bdrv(&s->common, "intermediate node", iter, 0, + BLK_PERM_ALL, &error_abort); } s->base = base; -- cgit v1.1