All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard W.M. Jones" <rjones@redhat.com>
To: qemu-devel@nongnu.org, pbonzini@redhat.com
Subject: [Qemu-devel] fstrim & upstream kernel not working
Date: Thu, 13 Mar 2014 21:49:35 +0000	[thread overview]
Message-ID: <20140313214814.GC1985@redhat.com> (raw)

I got fstrim happily working in Fedora 20, but it's not working with
the upstream kernel.  The message is:

  fstrim -v /sysroot/
  [   45.541339] sda: WRITE SAME failed. Manually zeroing.
  /sysroot/: 47.2 MiB (49466368 bytes) trimmed

While this isn't technically an error, it of course doesn't trim
anything.  In fact the host disk grows after the fstrim.

A couple of questions:

- Is there any reason why virtio-scsi doesn't emulate WRITE SAME?  It
seems pretty simple, and upstream kernels issue WRITE SAME when they
want to zero large areas of disk.

- Can you see where ext4 issues the zeroout/write same call?  AFAICT
it is still issuing discards, but these are getting turned into
zeroout/write same by some sort of block layer magic that I can't
quite follow.

kernel: 3.14.0-0.rc6.git2.1.fc21
qemu: 1.7.0-5.fc21.x86_64

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)

             reply	other threads:[~2014-03-13 21:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-13 21:49 Richard W.M. Jones [this message]
2014-03-14 12:30 ` [Qemu-devel] fstrim & upstream kernel not working Paolo Bonzini
2014-03-14 12:42   ` Richard W.M. Jones
2014-03-14 12:47     ` Paolo Bonzini
2014-03-14 13:24       ` Richard W.M. Jones
2014-03-14 13:28         ` Paolo Bonzini
2014-03-14 13:34           ` 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=20140313214814.GC1985@redhat.com \
    --to=rjones@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.