From: "Richard W.M. Jones" <rjones@redhat.com>
To: Fam Zheng <famz@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Should 'qemu-img commit' sparsify the backing file?
Date: Thu, 5 Nov 2015 12:18:59 +0000 [thread overview]
Message-ID: <20151105121859.GR29330@redhat.com> (raw)
In-Reply-To: <20151105094601.GA14058@ad.usersys.redhat.com>
On Thu, Nov 05, 2015 at 05:46:01PM +0800, Fam Zheng wrote:
> Does virt-sparsify work if there is no file system present (e.g. the disk is
> fully filled with zeroes) on the device?
It doesn't do anything bad, but it doesn't currently do that. You
could do that using:
guestfish <<EOF
add zeroes.img discard:enable format:raw
run
blkdiscard /dev/sda
EOF
To add this to virt-sparsify, we'd need a different primitive command,
one which only trims blocks that contain zero (blkdiscard trims
everything), which we don't have right now.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/
next prev parent reply other threads:[~2015-11-05 12:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 16:37 [Qemu-devel] Should 'qemu-img commit' sparsify the backing file? Richard W.M. Jones
2015-11-05 7:14 ` Fam Zheng
2015-11-05 8:56 ` Richard W.M. Jones
2015-11-05 9:46 ` Fam Zheng
2015-11-05 12:18 ` Richard W.M. Jones [this message]
2015-11-09 16:03 ` 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=20151105121859.GR29330@redhat.com \
--to=rjones@redhat.com \
--cc=famz@redhat.com \
--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).