diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/backup.c | 4 | ||||
-rw-r--r-- | block/commit.c | 8 | ||||
-rw-r--r-- | block/mirror.c | 9 | ||||
-rw-r--r-- | block/stream.c | 4 |
4 files changed, 19 insertions, 6 deletions
diff --git a/block/backup.c b/block/backup.c index c7596840e4..405f271395 100644 --- a/block/backup.c +++ b/block/backup.c @@ -657,7 +657,9 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs, job->cluster_size = MAX(BACKUP_CLUSTER_SIZE_DEFAULT, bdi.cluster_size); } - block_job_add_bdrv(&job->common, target); + /* FIXME Use real permissions */ + block_job_add_bdrv(&job->common, "target", target, 0, BLK_PERM_ALL, + &error_abort); job->common.len = len; block_job_txn_add_job(txn, &job->common); diff --git a/block/commit.c b/block/commit.c index 60d29a9c0f..b69586ff7b 100644 --- a/block/commit.c +++ b/block/commit.c @@ -267,13 +267,17 @@ void commit_start(const char *job_id, BlockDriverState *bs, * disappear from the chain after this operation. */ assert(bdrv_chain_contains(top, base)); for (iter = top; iter != backing_bs(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); } /* overlay_bs must be blocked because it needs to be modified to * update the backing image string, but if it's the root node then * don't block it again */ if (bs != overlay_bs) { - block_job_add_bdrv(&s->common, overlay_bs); + /* FIXME Use real permissions */ + block_job_add_bdrv(&s->common, "overlay of top", overlay_bs, 0, + BLK_PERM_ALL, &error_abort); } /* FIXME Use real permissions */ diff --git a/block/mirror.c b/block/mirror.c index 18128e6163..4d325f1811 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -1052,13 +1052,18 @@ static void mirror_start_job(const char *job_id, BlockDriverState *bs, return; } - block_job_add_bdrv(&s->common, target); + /* FIXME Use real permissions */ + block_job_add_bdrv(&s->common, "target", target, 0, BLK_PERM_ALL, + &error_abort); + /* In commit_active_start() all intermediate nodes disappear, so * any jobs in them must be blocked */ if (bdrv_chain_contains(bs, target)) { BlockDriverState *iter; for (iter = backing_bs(bs); iter != target; 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); } } diff --git a/block/stream.c b/block/stream.c index 7f49279b38..ba8650f0a4 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; |