[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 15/44] block: Add BDRV_O_RESIZE for blk_new_o
From: |
Max Reitz |
Subject: |
Re: [Qemu-devel] [PATCH v3 15/44] block: Add BDRV_O_RESIZE for blk_new_open() |
Date: |
Tue, 28 Feb 2017 16:07:57 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 |
On 28.02.2017 13:54, Kevin Wolf wrote:
> blk_new_open() is a convenience function that processes flags rather
> than QDict options as a simple way to just open an image file.
>
> In order to keep it convenient in the future, it must automatically
> request the necessary permissions. This can easily be inferred from the
> flags for read and write, but we need another flag that tells us whether
> to get the resize permission.
>
> We can't just always request it because that means that no block jobs
> can run on the resulting BlockBackend (which is something that e.g.
> qemu-img commit wants to do), but we also can't request it never because
> most of the .bdrv_create() implementations call blk_truncate().
>
> The solution is to introduce another flag that is passed by all users
> that want to resize the image.
>
> Signed-off-by: Kevin Wolf <address@hidden>
> ---
> block/parallels.c | 3 ++-
> block/qcow.c | 3 ++-
> block/qcow2.c | 6 ++++--
> block/qed.c | 3 ++-
> block/sheepdog.c | 2 +-
> block/vdi.c | 3 ++-
> block/vhdx.c | 3 ++-
> block/vmdk.c | 6 ++++--
> block/vpc.c | 3 ++-
> include/block/block.h | 1 +
> qemu-img.c | 2 +-
> 11 files changed, 23 insertions(+), 12 deletions(-)
Reviewed-by: Max Reitz <address@hidden>
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v3 06/44] block: Request child permissions in filter drivers, (continued)
- [Qemu-devel] [PATCH v3 06/44] block: Request child permissions in filter drivers, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 07/44] block: Default .bdrv_child_perm() for format drivers, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 08/44] block: Request child permissions in format drivers, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 09/44] vvfat: Implement .bdrv_child_perm(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 10/44] block: Require .bdrv_child_perm() with child nodes, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 11/44] block: Request real permissions in bdrv_attach_child(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 12/44] block: Add permissions to BlockBackend, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 15/44] block: Add BDRV_O_RESIZE for blk_new_open(), Kevin Wolf, 2017/02/28
- Re: [Qemu-devel] [PATCH v3 15/44] block: Add BDRV_O_RESIZE for blk_new_open(),
Max Reitz <=
- [Qemu-devel] [PATCH v3 16/44] block: Request real permissions in blk_new_open(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 13/44] block: Add permissions to blk_new(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 14/44] block: Add error parameter to blk_insert_bs(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 17/44] block: Allow error return in BlockDevOps.change_media_cb(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 18/44] hw/block: Request permissions, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 21/44] block: Add BdrvChildRole.get_parent_desc(), Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 19/44] hw/block: Introduce share-rw qdev property, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 23/44] block: Add BdrvChildRole.stay_at_node, Kevin Wolf, 2017/02/28
- [Qemu-devel] [PATCH v3 22/44] block: Include details on permission errors in message, Kevin Wolf, 2017/02/28