From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzmKa-0004cV-88 for qemu-devel@nongnu.org; Fri, 10 Aug 2012 06:20:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzmKV-0004m3-Mm for qemu-devel@nongnu.org; Fri, 10 Aug 2012 06:20:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39581) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzmKV-0004lp-Eg for qemu-devel@nongnu.org; Fri, 10 Aug 2012 06:20:31 -0400 Message-ID: <5024E06A.4070603@redhat.com> Date: Fri, 10 Aug 2012 12:20:26 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <502283FA.2080506@profihost.ag> <5022912B.2000607@redhat.com> <50235527.4090804@profihost.ag> <50236059.7060801@redhat.com> <4A799203-5BFF-4DE9-9B85-459096EBEC22@profihost.ag> <50236484.2090702@redhat.com> <502369C7.7000300@profihost.ag> <50238E2A.1050203@profihost.ag> <5024D2E7.40700@profihost.ag> In-Reply-To: <5024D2E7.40700@profihost.ag> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] virtio-scsi vs. virtio-blk List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Priebe - Profihost AG Cc: Stefan Hajnoczi , qemu-devel Il 10/08/2012 11:22, Stefan Priebe - Profihost AG ha scritto: > virtio-scsi is now working fine. Could you please help me to get discard > / trim running? I can't find any information what is needed to get > discard / trim working. You need to add discard_granularity=NNN, where NNN is usually 512 for raw and the cluster size (65536) for qcow2. However, discard is supported only for XFS on raw, and on qcow2 it will not reclaim space---the space will only be reused for future qcow2 allocation. Better support for discard on raw (other filesystems + block devices), and more efficient support also on other formats is on my todo list for the future. However, an efficient implementation unfortunately requires changes at all levels including the kernel. I hope to present something about it at KVM Forum. Paolo