]> git.proxmox.com Git - mirror_qemu.git/commit - hmp.c
block: Add permissions to blk_new()
authorKevin Wolf <kwolf@redhat.com>
Fri, 20 Jan 2017 16:07:26 +0000 (17:07 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Feb 2017 19:40:36 +0000 (20:40 +0100)
commit6d0eb64d5c6d57017c52a4f36ccae1db79215ee1
treeac53990a1e31ff6232f31cb8c9d3a322e960fb4b
parent981776b34875ef75b218a338e1831b8fc65ea6bd
block: Add permissions to blk_new()

We want every user to be specific about the permissions it needs, so
we'll pass the initial permissions as parameters to blk_new(). A user
only needs to call blk_set_perm() if it wants to change the permissions
after the fact.

The permissions are stored in the BlockBackend and applied whenever a
BlockDriverState should be attached in blk_insert_bs().

This does not include actually choosing the right set of permissions
everywhere yet. Instead, the usual FIXME comment is added to each place
and will be addressed in individual patches.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Acked-by: Fam Zheng <famz@redhat.com>
18 files changed:
block.c
block/backup.c
block/block-backend.c
block/commit.c
block/mirror.c
block/qcow2.c
blockdev.c
blockjob.c
hmp.c
hw/block/fdc.c
hw/core/qdev-properties-system.c
hw/ide/qdev.c
hw/scsi/scsi-disk.c
include/sysemu/block-backend.h
migration/block.c
nbd/server.c
tests/test-blockjob.c
tests/test-throttle.c