Il 13/03/2014 22:49, Richard W.M. Jones ha scritto:
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?

Yes, the reason is that you're using QEMU 1.7. :)

- 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.

That's provisioning_mode, which is writesame_16 with QEMU 1.7 and unmap with QEMU 2.0.

Paolo

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


Reply via email to