qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: qemu-devel@nongnu.org, John Snow <jsnow@redhat.com>,
	Nir Soffer <nsoffer@redhat.com>,
	Maor Lipchuk <mlipchuk@redhat.com>,
	Alberto Garcia <berto@igalia.com>,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v6 0/9] qemu-img: add measure sub-command
Date: Mon, 12 Jun 2017 10:29:46 +0100	[thread overview]
Message-ID: <20170612092946.GA3628@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170508141536.20690-1-stefanha@redhat.com>

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

On Mon, May 08, 2017 at 10:15:27AM -0400, Stefan Hajnoczi wrote:
> v6:
>  * Change bdrv_measure() return type to BlockMeasureInfo * [Eric]
>  * Clarify that holes in sparse POSIX files are still counted [Eric]
> 
> v5:
>  * Use UINT64_MAX instead of ~0ULL [Berto]
>  * Document qemu-img measure ofmt, fmt, output_fmt, and snapshot_param
>    [Berto]
> 
> v4:
>  * Make qcow2 refcount calculation conservative [Maor]
>  * Include actual qemu-img convert image size in test cases
> 
> v3:
>  * Drop RFC, this is ready to go for QEMU 2.10
>  * Use "required size" instead of "required bytes" in qemu-img output for
>    consistency [Nir]
>  * Clarify BlockMeasureInfo semantics [Max]
>  * Clarify bdrv_measure() opts argument and error handling [Nir]
>  * Handle -o backing_file= for qcow2 [Max]
>  * Handle snapshot options in qemu-img measure
>  * Probe input image for allocated data clusters for qcow2.  Didn't centralize
>    this because there are format-specific aspects such as the cluster_size.  It
>    may make sense to centralize it later (with a bit more complexity) if
>    support is added to more formats.
>  * Add qemu-img(1) man page section for 'measure' sub-command [Max]
>  * Extend test case to cover additional scenarios [Nir]
> 
> RFCv2:
>  * Publishing RFC again to discuss the new user-visible interfaces.  Code has
>    changed quite a bit, I have not kept any Reviewed-by tags.
>  * Rename qemu-img sub-command "measure" and API bdrv_measure() [Nir]
>  * Report both "required bytes" and "fully allocated bytes" to handle the empty
>    image file and prealloc use cases [Nir and Dan]
>  * Use bdrv_getlength() instead of bdrv_nb_sectors() [Berto]
>  * Rename "err" label "out" in qemu-img-cmds.c [Nir]
>  * Add basic qcow2 support, doesn't support qemu-img convert from existing files yet
> 
> RFCv1:
>  * Publishing patch series with just raw support, no qcow2 yet.  Please review
>    the command-line interface and let me know if you are happy with this
>    approach.
> 
> 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                    | 372 +++++++++++++++++++++++++++++----------
>  block/raw-format.c               |  26 +++
>  qemu-img.c                       | 228 ++++++++++++++++++++++++
>  qemu-img-cmds.hx                 |   6 +
>  qemu-img.texi                    |  30 ++++
>  tests/qemu-iotests/178           | 168 ++++++++++++++++++
>  tests/qemu-iotests/178.out.qcow2 | 278 +++++++++++++++++++++++++++++
>  tests/qemu-iotests/178.out.raw   | 146 +++++++++++++++
>  tests/qemu-iotests/check         |   5 +
>  tests/qemu-iotests/group         |   1 +
>  14 files changed, 1230 insertions(+), 94 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

Ping ^ 2

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]

      parent reply	other threads:[~2017-06-12  9:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-08 14:15 [Qemu-devel] [PATCH v6 0/9] qemu-img: add measure sub-command Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 1/9] block: add bdrv_measure() API Stefan Hajnoczi
2017-05-08 14:50   ` Eric Blake
2017-05-09 15:28     ` Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 2/9] raw-format: add bdrv_measure() support Stefan Hajnoczi
2017-05-08 14:52   ` Eric Blake
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 3/9] qcow2: extract preallocation calculation function Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 4/9] qcow2: make refcount size calculation conservative Stefan Hajnoczi
2017-05-08 15:00   ` Eric Blake
2017-05-08 19:06     ` Max Reitz
2017-05-08 21:26   ` Max Reitz
2017-05-09 15:32     ` Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 5/9] qcow2: extract image creation option parsing Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 6/9] qcow2: add bdrv_measure() support Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 7/9] qemu-img: add measure subcommand Stefan Hajnoczi
2017-06-12 10:00   ` Alberto Garcia
2017-06-13  9:09     ` Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 8/9] qemu-iotests: support per-format golden output files Stefan Hajnoczi
2017-05-08 14:15 ` [Qemu-devel] [PATCH v6 9/9] iotests: add test 178 for qemu-img measure Stefan Hajnoczi
2017-05-24 12:59 ` [Qemu-devel] [PATCH v6 0/9] qemu-img: add measure sub-command Stefan Hajnoczi
2017-06-12  9:29 ` Stefan Hajnoczi [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=20170612092946.GA3628@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=berto@igalia.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 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).