From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WODVY-0007X4-HM for qemu-devel@nongnu.org; Thu, 13 Mar 2014 17:49:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WODVT-0004oe-6Y for qemu-devel@nongnu.org; Thu, 13 Mar 2014 17:49:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60824) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WODVS-0004nx-UW for qemu-devel@nongnu.org; Thu, 13 Mar 2014 17:49:39 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s2DLnbd8006721 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Mar 2014 17:49:37 -0400 Date: Thu, 13 Mar 2014 21:49:35 +0000 From: "Richard W.M. Jones" Message-ID: <20140313214814.GC1985@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] fstrim & upstream kernel not working List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, pbonzini@redhat.com 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#)