From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Teng-Feng Yang <shinrairis@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TRIM/DISCARD/UNMAP support on qemu-nbd
Date: Tue, 7 Jan 2014 21:27:07 +0000 [thread overview]
Message-ID: <20140107212707.GD4802@redhat.com> (raw)
In-Reply-To: <52CC6811.4000107@redhat.com>
Using qcow2 format, it also doesn't appear to work:
$ /tmp/sparsetest.sh
Formatting '/tmp/test1', fmt=qcow2 size=104857600 encryption=off cluster_size=65536 lazy_refcounts=off
Formatting '/tmp/test2', fmt=qcow2 size=104857600 encryption=off cluster_size=65536 lazy_refcounts=off
136K /tmp/test1
136K /tmp/test2
Read Capacity results:
Protection: prot_en=0, p_type=0, p_i_exponent=0
Logical block provisioning: lbpme=1, lbprz=0
Last logical block address=204799 (0x31fff), Number of logical blocks=204800
Logical block length=512 bytes
Logical blocks per physical block exponent=0
Lowest aligned logical block address=0
Hence:
Device size: 104857600 bytes, 100.0 MiB, 0.10 GB
Block limits VPD page (SBC):
Write same no zero (WSNZ): 1
Maximum compare and write length: 0 blocks
Optimal transfer length granularity: 0 blocks
Maximum transfer length: 0 blocks
Optimal transfer length: 0 blocks
Maximum prefetch length: 0 blocks
Maximum unmap LBA count: 2097152
Maximum unmap block descriptor count: 255
Optimal unmap granularity: 8
Unmap granularity alignment valid: 0
Unmap granularity alignment: 0
Maximum write same length: 0x0 blocks
17M /tmp/test1
17M /tmp/test2
$ ll -h /tmp/test{1,2}
-rw-r--r--. 1 rjones rjones 17M Jan 7 21:24 /tmp/test1
-rw-r--r--. 1 rjones rjones 17M Jan 7 21:24 /tmp/test2
$ qemu-img info /tmp/test1
image: /tmp/test1
file format: qcow2
virtual size: 100M (104857600 bytes)
disk size: 16M
cluster_size: 65536
$ qemu-img info /tmp/test2
image: /tmp/test2
file format: qcow2
virtual size: 100M (104857600 bytes)
disk size: 16M
cluster_size: 65536
----------------------------------------------------------------------
A frustrating aspect of this is there's no diagnostics or way to probe
if UNMAP is supported all the way through.
This will be critical for virt-sparsify, since we'd like to be able to
tell the user in advance whether or not in-place sparsification is
going to work, and even better, why not.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines. Supports shell scripting,
bindings from many languages. http://libguestfs.org
next prev parent reply other threads:[~2014-01-07 21:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-30 11:58 [Qemu-devel] TRIM/DISCARD/UNMAP support on qemu-nbd Teng-Feng Yang
2014-01-02 16:15 ` Richard W.M. Jones
2014-01-07 14:48 ` Paolo Bonzini
2014-01-07 20:27 ` Richard W.M. Jones
2014-01-07 20:48 ` Paolo Bonzini
2014-01-07 21:22 ` Richard W.M. Jones
2014-01-08 22:11 ` Paolo Bonzini
2014-01-08 22:24 ` Richard W.M. Jones
2014-01-08 22:45 ` Paolo Bonzini
2014-01-08 22:53 ` Richard W.M. Jones
2014-01-09 7:02 ` Paolo Bonzini
2014-01-07 21:27 ` Richard W.M. Jones [this message]
2014-01-06 2:45 ` Stefan Hajnoczi
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=20140107212707.GD4802@redhat.com \
--to=rjones@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shinrairis@gmail.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).