From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: den@openvz.org, jcody@redhat.com, eblake@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 6/8] vhdx: Support .bdrv_co_create
Date: Tue, 13 Mar 2018 15:59:38 +0100 [thread overview]
Message-ID: <f9e6e86b-c29d-bbf6-b979-ac33eb953391@redhat.com> (raw)
In-Reply-To: <20180313144730.2184-7-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1507 bytes --]
On 2018-03-13 15:47, Kevin Wolf wrote:
> This adds the .bdrv_co_create driver callback to vhdx, which
> enables image creation over QMP.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> qapi/block-core.json | 40 +++++++++-
> block/vhdx.c | 216 ++++++++++++++++++++++++++++++++++++++-------------
> 2 files changed, 203 insertions(+), 53 deletions(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
> diff --git a/block/vhdx.c b/block/vhdx.c
> index d82350d07c..f1b97f4b49 100644
> --- a/block/vhdx.c
> +++ b/block/vhdx.c
[...]
> @@ -1792,59 +1797,71 @@ exit:
> * .---- ~ ----------- ~ ------------ ~ ---------------- ~ -----------.
> * 1MB
> */
> -static int coroutine_fn vhdx_co_create_opts(const char *filename, QemuOpts *opts,
> - Error **errp)
> +static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts,
> + Error **errp)
> {
[...]
> /* These are pretty arbitrary, and mainly designed to keep the BAT
> * size reasonable to load into RAM */
> - if (block_size == 0) {
> + if (vhdx_opts->has_block_size) {
> + block_size = vhdx_opts->block_size;
> + } else {
Ah, good. I have to admit I was a bit worried you'd keep the special
meaning of cluster_size == 0.
Max
> if (image_size > 32 * TiB) {
> block_size = 64 * MiB;
> } else if (image_size > (uint64_t) 100 * GiB) {
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2018-03-13 14:59 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 14:47 [Qemu-devel] [PATCH v2 0/8] block: .bdrv_co_create for format drivers Kevin Wolf
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 1/8] parallels: Support .bdrv_co_create Kevin Wolf
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 2/8] qemu-iotests: Enable write tests for parallels Kevin Wolf
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 3/8] qcow: Support .bdrv_co_create Kevin Wolf
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 4/8] qed: " Kevin Wolf
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 5/8] vdi: Make comments consistent with other drivers Kevin Wolf
2018-03-13 14:55 ` Max Reitz
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 6/8] vhdx: Support .bdrv_co_create Kevin Wolf
2018-03-13 14:59 ` Max Reitz [this message]
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 7/8] vpc: " Kevin Wolf
2018-03-13 15:00 ` Max Reitz
2018-03-13 14:47 ` [Qemu-devel] [PATCH v2 8/8] vpc: Require aligned size in .bdrv_co_create Kevin Wolf
2018-03-13 15:04 ` Max Reitz
2018-03-13 15:12 ` [Qemu-devel] [PATCH v2 0/8] block: .bdrv_co_create for format drivers Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f9e6e86b-c29d-bbf6-b979-ac33eb953391@redhat.com \
--to=mreitz@redhat.com \
--cc=den@openvz.org \
--cc=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).