qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Hu Tao <hutao@cn.fujitsu.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Peter Lieven <pl@kamp.de>,
	Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full
Date: Fri, 20 Dec 2013 11:30:21 +0100	[thread overview]
Message-ID: <20131220103021.GH27021@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <cover.1387419339.git.hutao@cn.fujitsu.com>

On Thu, Dec 19, 2013 at 10:27:35AM +0800, Hu Tao wrote:
> This series implements full image preallocation to create a non-sparse image
> file at creation time, both for raw and qcow2 format. The purpose is to avoid
> performance deterioration of the guest cause by sparse image.

I'm not sure the new bdrv_preallocate() interface is necessary.  Can
qcow2_create() simply pass a preallocate=full option to
bdrv_create_file()?

It's simpler if we avoid bdrv_preallocate(), just keep it a
.bdrv_create() option.  That way we also avoid the question of how
exactly preallocate functions on an image file that already has blocks
allocated.

So what I imagine is:
1. Add preallocation=full support to raw-posix.c
2. Add preallocation=full support to qcow2.c, calculate image file size
including metadata for bdrv_create_file().

CCing Eric Blake so libvirt can consider how full preallocation
interacts with their safezero() preallocation.  If QEMU handles
preallocation can we skip safezero()?  Is there a concern about full
preallocation in QEMU taking a long time without progress report?

Stefan

  parent reply	other threads:[~2013-12-20 10:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-19  2:27 [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full Hu Tao
2013-12-19  2:27 ` [Qemu-devel] [RFC PATCH v3 1/6] block: introduce prealloc_mode Hu Tao
2013-12-20 10:08   ` Stefan Hajnoczi
2013-12-20 12:36   ` Eric Blake
2013-12-19  2:27 ` [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_preallocate Hu Tao
2013-12-20 10:10   ` Stefan Hajnoczi
2013-12-24  8:31     ` Hu Tao
2013-12-19  2:27 ` [Qemu-devel] [RFC PATCH v3 3/6] block/raw-posix: implement bdrv_preallocate Hu Tao
2013-12-20 10:14   ` Stefan Hajnoczi
2013-12-23  1:45     ` Hu Tao
2013-12-19  2:27 ` [Qemu-devel] [RFC PATCH v3 4/6] raw-posix: Add full image preallocation option Hu Tao
2013-12-19  2:27 ` [Qemu-devel] [RFC PATCH v3 5/6] qcow2: implement bdrv_preallocate Hu Tao
2013-12-20 10:19   ` Stefan Hajnoczi
2013-12-19  2:27 ` [Qemu-devel] [RFC PATCH v3 6/6] qcow2: Add full image preallocation option Hu Tao
2013-12-20 10:21   ` Stefan Hajnoczi
2013-12-20 10:30 ` Stefan Hajnoczi [this message]
2013-12-20 12:54   ` [Qemu-devel] [RFC PATCH v3 0/6] qemu-img: add preallocation=full Eric Blake
2013-12-23  1:59   ` Hu Tao

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=20131220103021.GH27021@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=famz@redhat.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=kwolf@redhat.com \
    --cc=pl@kamp.de \
    --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).