qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, qemu-devel@nongnu.org,
	Anthony Liguori <anthony@codemonkey.ws>
Subject: Re: [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes.
Date: Mon, 30 Jul 2012 14:51:36 +0100	[thread overview]
Message-ID: <20120730135136.GE2701@amd.home.annexia.org> (raw)
In-Reply-To: <5012E592.8010400@redhat.com>

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

On Fri, Jul 27, 2012 at 09:01:38PM +0200, Paolo Bonzini wrote:
> Or just finish up discard support and use the existing fstrim command of
> qemu-ga.  :)

What's actually involved to do this?  I noticed that a virtio-scsi on
qcow2 v3 device exported to the guest does not appear to support TRIM
at all (see attached test script and output).

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

[-- Attachment #2: test.sh --]
[-- Type: application/x-sh, Size: 700 bytes --]

[-- Attachment #3: test-output.txt --]
[-- Type: text/plain, Size: 1629 bytes --]

Formatting 'test1.qcow2', fmt=qcow2 size=104857600 compat='1.1' encryption=off cluster_size=65536 
libguestfs: trace: add_drive "test1.qcow2"
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: launch = 0
libguestfs: trace: debug "sh" "uname -a"
libguestfs: trace: debug = "Linux (none) 3.5.0-1.fc18.x86_64 #1 SMP Mon Jul 23 17:43:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux"
Linux (none) 3.5.0-1.fc18.x86_64 #1 SMP Mon Jul 23 17:43:39 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
libguestfs: trace: debug "sh" "head -n99999999 /sys/block/sd*/queue/discard_max_bytes"
libguestfs: trace: debug = "==> /sys/block/sda/queue/discard_max_bytes <==\n0\n\n==> /sys/block/sdb/queue/discard_max_bytes <==\n0"
==> /sys/block/sda/queue/discard_max_bytes <==
0

==> /sys/block/sdb/queue/discard_max_bytes <==
0
libguestfs: trace: part_disk "/dev/sda" "mbr"
libguestfs: trace: part_disk = 0
libguestfs: trace: mkfs "ext4" "/dev/sda1"
libguestfs: trace: mkfs = 0
libguestfs: trace: mount_options "discard" "/dev/sda1" "/"
libguestfs: trace: mount_options = 0
libguestfs: trace: fill 88 52428800 "/data"
libguestfs: trace: fill = 0
libguestfs: trace: sync
libguestfs: trace: sync = 0
-rw-r--r--. 1 rjones rjones 56M Jul 30 14:49 test1.qcow2
libguestfs: trace: rm "/data"
libguestfs: trace: rm = 0
libguestfs: trace: fstrim "/"
libguestfs: trace: fstrim = -1 (error)
*stdin*:23: libguestfs: error: fstrim: fstrim: /: FITRIM ioctl failed: Operation not supported
libguestfs: trace: close
libguestfs: trace: shutdown
libguestfs: trace: internal_autosync
libguestfs: trace: internal_autosync = 0
libguestfs: trace: shutdown = 0

  reply	other threads:[~2012-07-30 13:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 15:59 [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied) Richard W.M. Jones
2012-07-26 15:59 ` [Qemu-devel] [PATCH] block: Add -drive detect_zero=on|off option to detect all zero writes Richard W.M. Jones
2012-07-27 13:58   ` Anthony Liguori
2012-07-27 19:01     ` Paolo Bonzini
2012-07-30 13:51       ` Richard W.M. Jones [this message]
2012-07-30 13:57         ` Paolo Bonzini
2012-07-30 14:03           ` Eric Blake
2012-07-30 14:09             ` Paolo Bonzini
2012-07-30 14:38               ` Kevin Wolf
2012-07-30 15:52                 ` Richard W.M. Jones
2012-07-27 13:55 ` [Qemu-devel] [PATCH] Detect zero writes (for discussion only, not to be applied) Anthony Liguori
2012-07-27 15:14   ` Richard W.M. Jones

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=20120730135136.GE2701@amd.home.annexia.org \
    --to=rjones@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@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).