[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] fstrim & upstream kernel not working
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] fstrim & upstream kernel not working |
Date: |
Fri, 14 Mar 2014 13:30:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
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