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#)