Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 02:28:24PM +0100, Paolo Bonzini wrote: > Il 14/03/2014 14:24, Richard W.M. Jones ha scritto: > >>> Could be a race condition (something going on in the background > >>> between rm and fstrim). > >Not much happens in the libguestfs appliance. There are usually only > >two pr

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Paolo Bonzini
Il 14/03/2014 14:24, Richard W.M. Jones ha scritto: > Could be a race condition (something going on in the background > between rm and fstrim). Not much happens in the libguestfs appliance. There are usually only two processes (udev + guestfsd). There's also the kernel. The ext4 driver is pr

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 01:47:59PM +0100, Paolo Bonzini wrote: > Il 14/03/2014 13:42, Richard W.M. Jones ha scritto: > >I worked around this in any case by rearranging the test [2]: > > > >Doing: > > > > rm /a_big_file > > fstrim / > > sync > > umount / > > [shut down qemu] > > > >would only t

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Paolo Bonzini
Il 14/03/2014 13:42, Richard W.M. Jones ha scritto: I worked around this in any case by rearranging the test [2]: Doing: rm /a_big_file fstrim / sync umount / [shut down qemu] would only trim 64 KB on the host. Doing: rm /a_big_file umount / # added mo

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Richard W.M. Jones
On Fri, Mar 14, 2014 at 01:30:40PM +0100, Paolo Bonzini wrote: > Il 13/03/2014 22:49, Richard W.M. Jones ha scritto: > >- 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 sa

Re: [Qemu-devel] fstrim & upstream kernel not working

2014-03-14 Thread Paolo Bonzini
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 th

[Qemu-devel] fstrim & upstream kernel not working

2014-03-13 Thread Richard W.M. Jones
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 tr