qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hu Tao <hutao@cn.fujitsu.com>
To: Kevin Wolf <kwolf@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	Peter Lieven <pl@kamp.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC PATCH v2 0/6] qemu-img: add preallocation=full
Date: Wed, 27 Nov 2013 10:15:38 +0800	[thread overview]
Message-ID: <cover.1385518315.git.hutao@cn.fujitsu.com> (raw)

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.

This series implements full preallocation by using fallocate()/posix_fallocate(),
which have the advantage that it is fast when creating large image file.
Zero-filling is not implemented, as writing zeros to image could be slow for large
file. (fallocate() ensures zero-filling, but posix_fallocate()) If users want it,
we can maybe add a option to let users have a choice. Suggestions?

Base on Kevin's patch at:
http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg03017.html

Hu Tao (6):
  block: introduce prealloc_mode
  block: add BlockDriver.bdrv_preallocate.
  block/raw-posix: implement bdrv_preallocate
  raw-posix: Add full image preallocation option
  qcow2: implement bdrv_preallocate
  qcow2: Add full image preallocation option

 block.c                   | 13 +++++++++++
 block/qcow2.c             | 32 +++++++++++++++++++++------
 block/raw-posix.c         | 56 +++++++++++++++++++++++++++++++++++++++++++++++
 include/block/block.h     |  7 ++++++
 include/block/block_int.h |  3 +++
 5 files changed, 104 insertions(+), 7 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2013-11-27  2:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-27  2:15 Hu Tao [this message]
2013-11-27  2:15 ` [Qemu-devel] [RFC PATCH v2 1/6] block: introduce prealloc_mode Hu Tao
2013-11-27  2:15 ` [Qemu-devel] [RFC PATCH v2 2/6] block: add BlockDriver.bdrv_preallocate Hu Tao
2013-11-27  2:35   ` Fam Zheng
2013-11-27  2:15 ` [Qemu-devel] [RFC PATCH v2 3/6] block/raw-posix: implement bdrv_preallocate Hu Tao
2013-11-27  2:40   ` Fam Zheng
2013-11-27  2:15 ` [Qemu-devel] [RFC PATCH v2 4/6] raw-posix: Add full image preallocation option Hu Tao
2013-11-27  2:15 ` [Qemu-devel] [RFC PATCH v2 5/6] qcow2: implement bdrv_preallocate Hu Tao
2013-11-27  3:01   ` Fam Zheng
2013-11-27  6:01     ` Hu Tao
2013-11-27  6:40       ` Fam Zheng
2013-11-27 10:03         ` Peter Lieven
2013-11-27 10:07           ` Fam Zheng
2013-11-27 10:13             ` Peter Lieven
2013-11-28  8:48               ` Hu Tao
2013-11-28 10:03                 ` Peter Lieven
2013-12-11  7:33                   ` Hu Tao
2013-12-16  8:24                     ` Hu Tao
2013-12-16  9:21                     ` Fam Zheng
2013-12-17  2:03                       ` Hu Tao
2013-11-27  2:15 ` [Qemu-devel] [RFC PATCH v2 6/6] qcow2: Add full image preallocation option Hu Tao
2013-11-27  3:22 ` [Qemu-devel] [RFC PATCH v2 0/6] qemu-img: add preallocation=full Fam Zheng

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=cover.1385518315.git.hutao@cn.fujitsu.com \
    --to=hutao@cn.fujitsu.com \
    --cc=berrange@redhat.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).