[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [RFC PATCH 10/41] block: Request child permissions in f
From: |
Max Reitz |
Subject: |
Re: [Qemu-block] [RFC PATCH 10/41] block: Request child permissions in format drivers |
Date: |
Wed, 15 Feb 2017 18:26:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 13.02.2017 18:22, Kevin Wolf wrote:
> This makes use of the .bdrv_child_perm() implementation for formats that
> we just added. All format drivers expose the permissions they actually
> need nows, so that they can be set accordingly and updated when parents
> are attached or detached.
>
> The only format not included here is raw, which was already converted
> with the other filter drivers.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/bochs.c | 1 +
In theory it might make sense to have another category "read-only format
drivers". In practice those are the drivers we don't care much about,
soooo...
> block/cloop.c | 1 +
> block/crypto.c | 1 +
I'm not sure whether the crypto driver qualifies more as a format driver
than as a filter driver. I guess saying it's a format driver is a bit
more strict and it's better to be strict when it doubt.
Max
> block/dmg.c | 1 +
> block/parallels.c | 1 +
> block/qcow.c | 1 +
> block/qcow2.c | 1 +
> block/qed.c | 1 +
> block/vdi.c | 1 +
> block/vhdx.c | 1 +
> block/vmdk.c | 1 +
> block/vpc.c | 1 +
> 12 files changed, 12 insertions(+)
>
> diff --git a/block/bochs.c b/block/bochs.c
> index 7dd2ac4..516da56 100644
> --- a/block/bochs.c
> +++ b/block/bochs.c
> @@ -293,6 +293,7 @@ static BlockDriver bdrv_bochs = {
> .instance_size = sizeof(BDRVBochsState),
> .bdrv_probe = bochs_probe,
> .bdrv_open = bochs_open,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_refresh_limits = bochs_refresh_limits,
> .bdrv_co_preadv = bochs_co_preadv,
> .bdrv_close = bochs_close,
> diff --git a/block/cloop.c b/block/cloop.c
> index 877c9b0..a6c7b9d 100644
> --- a/block/cloop.c
> +++ b/block/cloop.c
> @@ -290,6 +290,7 @@ static BlockDriver bdrv_cloop = {
> .instance_size = sizeof(BDRVCloopState),
> .bdrv_probe = cloop_probe,
> .bdrv_open = cloop_open,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_refresh_limits = cloop_refresh_limits,
> .bdrv_co_preadv = cloop_co_preadv,
> .bdrv_close = cloop_close,
> diff --git a/block/crypto.c b/block/crypto.c
> index 200fd0b..ca46883 100644
> --- a/block/crypto.c
> +++ b/block/crypto.c
> @@ -628,6 +628,7 @@ BlockDriver bdrv_crypto_luks = {
> .bdrv_probe = block_crypto_probe_luks,
> .bdrv_open = block_crypto_open_luks,
> .bdrv_close = block_crypto_close,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_create = block_crypto_create_luks,
> .bdrv_truncate = block_crypto_truncate,
> .create_opts = &block_crypto_create_opts_luks,
> diff --git a/block/dmg.c b/block/dmg.c
> index 8e387cd..a7d25fc 100644
> --- a/block/dmg.c
> +++ b/block/dmg.c
> @@ -697,6 +697,7 @@ static BlockDriver bdrv_dmg = {
> .bdrv_probe = dmg_probe,
> .bdrv_open = dmg_open,
> .bdrv_refresh_limits = dmg_refresh_limits,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_co_preadv = dmg_co_preadv,
> .bdrv_close = dmg_close,
> };
> diff --git a/block/parallels.c b/block/parallels.c
> index d3970e1..b79e7df 100644
> --- a/block/parallels.c
> +++ b/block/parallels.c
> @@ -762,6 +762,7 @@ static BlockDriver bdrv_parallels = {
> .bdrv_probe = parallels_probe,
> .bdrv_open = parallels_open,
> .bdrv_close = parallels_close,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_co_get_block_status = parallels_co_get_block_status,
> .bdrv_has_zero_init = bdrv_has_zero_init_1,
> .bdrv_co_flush_to_os = parallels_co_flush_to_os,
> diff --git a/block/qcow.c b/block/qcow.c
> index a6dfe1a..3a95d4f 100644
> --- a/block/qcow.c
> +++ b/block/qcow.c
> @@ -1052,6 +1052,7 @@ static BlockDriver bdrv_qcow = {
> .bdrv_probe = qcow_probe,
> .bdrv_open = qcow_open,
> .bdrv_close = qcow_close,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_reopen_prepare = qcow_reopen_prepare,
> .bdrv_create = qcow_create,
> .bdrv_has_zero_init = bdrv_has_zero_init_1,
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 4684554..dac3fb8 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -3399,6 +3399,7 @@ BlockDriver bdrv_qcow2 = {
> .bdrv_reopen_commit = qcow2_reopen_commit,
> .bdrv_reopen_abort = qcow2_reopen_abort,
> .bdrv_join_options = qcow2_join_options,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_create = qcow2_create,
> .bdrv_has_zero_init = bdrv_has_zero_init_1,
> .bdrv_co_get_block_status = qcow2_co_get_block_status,
> diff --git a/block/qed.c b/block/qed.c
> index 1ea5114..eda9402 100644
> --- a/block/qed.c
> +++ b/block/qed.c
> @@ -1678,6 +1678,7 @@ static BlockDriver bdrv_qed = {
> .bdrv_open = bdrv_qed_open,
> .bdrv_close = bdrv_qed_close,
> .bdrv_reopen_prepare = bdrv_qed_reopen_prepare,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_create = bdrv_qed_create,
> .bdrv_has_zero_init = bdrv_has_zero_init_1,
> .bdrv_co_get_block_status = bdrv_qed_co_get_block_status,
> diff --git a/block/vdi.c b/block/vdi.c
> index 18b4773..fd6e26d 100644
> --- a/block/vdi.c
> +++ b/block/vdi.c
> @@ -891,6 +891,7 @@ static BlockDriver bdrv_vdi = {
> .bdrv_open = vdi_open,
> .bdrv_close = vdi_close,
> .bdrv_reopen_prepare = vdi_reopen_prepare,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_create = vdi_create,
> .bdrv_has_zero_init = bdrv_has_zero_init_1,
> .bdrv_co_get_block_status = vdi_co_get_block_status,
> diff --git a/block/vhdx.c b/block/vhdx.c
> index 4dc2743..8c5ade2 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
> @@ -1983,6 +1983,7 @@ static BlockDriver bdrv_vhdx = {
> .bdrv_open = vhdx_open,
> .bdrv_close = vhdx_close,
> .bdrv_reopen_prepare = vhdx_reopen_prepare,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_co_readv = vhdx_co_readv,
> .bdrv_co_writev = vhdx_co_writev,
> .bdrv_create = vhdx_create,
> diff --git a/block/vmdk.c b/block/vmdk.c
> index 9d68ec5..f5e2fb5 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -2359,6 +2359,7 @@ static BlockDriver bdrv_vmdk = {
> .bdrv_open = vmdk_open,
> .bdrv_check = vmdk_check,
> .bdrv_reopen_prepare = vmdk_reopen_prepare,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_co_preadv = vmdk_co_preadv,
> .bdrv_co_pwritev = vmdk_co_pwritev,
> .bdrv_co_pwritev_compressed = vmdk_co_pwritev_compressed,
> diff --git a/block/vpc.c b/block/vpc.c
> index d0df2a1..b9c9832 100644
> --- a/block/vpc.c
> +++ b/block/vpc.c
> @@ -1067,6 +1067,7 @@ static BlockDriver bdrv_vpc = {
> .bdrv_open = vpc_open,
> .bdrv_close = vpc_close,
> .bdrv_reopen_prepare = vpc_reopen_prepare,
> + .bdrv_child_perm = bdrv_format_default_perms,
> .bdrv_create = vpc_create,
>
> .bdrv_co_preadv = vpc_co_preadv,
>
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-block] [RFC PATCH 07/41] block: Default .bdrv_child_perm() for filter drivers, (continued)
[Qemu-block] [RFC PATCH 10/41] block: Request child permissions in format drivers, Kevin Wolf, 2017/02/13
- Re: [Qemu-block] [RFC PATCH 10/41] block: Request child permissions in format drivers,
Max Reitz <=
[Qemu-block] [RFC PATCH 11/41] vvfat: Implement .bdrv_child_perm(), Kevin Wolf, 2017/02/13
[Qemu-block] [RFC PATCH 12/41] block: Require .bdrv_child_perm() with child nodes, Kevin Wolf, 2017/02/13
[Qemu-block] [RFC PATCH 13/41] block: Request real permissions in bdrv_attach_child(), Kevin Wolf, 2017/02/13
[Qemu-block] [RFC PATCH 14/41] block: Add permissions to BlockBackend, Kevin Wolf, 2017/02/13
[Qemu-block] [RFC PATCH 15/41] block: Add permissions to blk_new(), Kevin Wolf, 2017/02/13