All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Maor Lipchuk <mlipchuk@redhat.com>,
	Eric Blake <eblake@redhat.com>, Alberto Garcia <berto@igalia.com>,
	John Snow <jsnow@redhat.com>, Nir Soffer <nsoffer@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v9 0/9] qemu-img: add measure sub-command
Date: Sun, 9 Jul 2017 21:36:54 +0200	[thread overview]
Message-ID: <3c7c5985-19b6-1488-2f53-cdd8ef421d8f@redhat.com> (raw)
In-Reply-To: <20170705125738.8777-1-stefanha@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]

On 2017-07-05 14:57, Stefan Hajnoczi wrote:
> v9:
>  * Fix swapped fmt <-> output_fmt parameters in documentation [Max]

Oh, it was just the wrong way around there.

>  * Clarify that backing file clusters also available in the new image
>    file *may* be ommitted from the calculation [Max]

[...]

> Users and management tools sometimes need to know the size required for a new
> disk image so that an LVM volume, SAN LUN, etc can be allocated ahead of time.
> Image formats like qcow2 have non-trivial metadata that makes it hard to
> estimate the exact size without knowledge of file format internals.
> 
> This patch series introduces a new qemu-img sub-command that calculates the
> required size for both image creation and conversion scenarios.
> 
> The conversion scenario is:
> 
>   $ qemu-img measure -f raw -O qcow2 input.img
>   required size: 1327680
>   fully allocated size: 1074069504
> 
> Here an existing image file is taken and the output includes the space required
> for data from the input image file.
> 
> The creation scenario is:
> 
>   $ qemu-img measure -O qcow2 --size 5G
>   required size: 327680
>   fully allocated size: 1074069504
> 
> Stefan Hajnoczi (9):
>   block: add bdrv_measure() API
>   raw-format: add bdrv_measure() support
>   qcow2: extract preallocation calculation function
>   qcow2: make refcount size calculation conservative
>   qcow2: extract image creation option parsing
>   qcow2: add bdrv_measure() support
>   qemu-img: add measure subcommand
>   qemu-iotests: support per-format golden output files
>   iotests: add test 178 for qemu-img measure
> 
>  qapi/block-core.json             |  25 +++
>  include/block/block.h            |   2 +
>  include/block/block_int.h        |   2 +
>  block.c                          |  35 ++++
>  block/qcow2.c                    | 383 +++++++++++++++++++++++++++++----------
>  block/raw-format.c               |  26 +++
>  qemu-img.c                       | 234 ++++++++++++++++++++++++
>  qemu-img-cmds.hx                 |   6 +
>  qemu-img.texi                    |  30 +++
>  tests/qemu-iotests/178           | 170 +++++++++++++++++
>  tests/qemu-iotests/178.out.qcow2 | 286 +++++++++++++++++++++++++++++
>  tests/qemu-iotests/178.out.raw   | 158 ++++++++++++++++
>  tests/qemu-iotests/check         |   5 +
>  tests/qemu-iotests/group         |   1 +
>  14 files changed, 1268 insertions(+), 95 deletions(-)
>  create mode 100755 tests/qemu-iotests/178
>  create mode 100644 tests/qemu-iotests/178.out.qcow2
>  create mode 100644 tests/qemu-iotests/178.out.raw

Thanks, applied to my block tree:

https://github.com/XanClic/qemu/commits/block

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 498 bytes --]

      parent reply	other threads:[~2017-07-09 19:37 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 12:57 [Qemu-devel] [PATCH v9 0/9] qemu-img: add measure sub-command Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 1/9] block: add bdrv_measure() API Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 2/9] raw-format: add bdrv_measure() support Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 3/9] qcow2: extract preallocation calculation function Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 4/9] qcow2: make refcount size calculation conservative Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 5/9] qcow2: extract image creation option parsing Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 6/9] qcow2: add bdrv_measure() support Stefan Hajnoczi
2017-07-11 18:59   ` Eric Blake
2017-07-11 19:04   ` Eric Blake
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 7/9] qemu-img: add measure subcommand Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 8/9] qemu-iotests: support per-format golden output files Stefan Hajnoczi
2017-07-05 12:57 ` [Qemu-devel] [PATCH v9 9/9] iotests: add test 178 for qemu-img measure Stefan Hajnoczi
2017-07-09 19:36 ` Max Reitz [this message]

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=3c7c5985-19b6-1488-2f53-cdd8ef421d8f@redhat.com \
    --to=mreitz@redhat.com \
    --cc=berrange@redhat.com \
    --cc=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mlipchuk@redhat.com \
    --cc=nsoffer@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.