From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Utyc9-0000e7-Fx for qemu-devel@nongnu.org; Tue, 02 Jul 2013 07:19:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Utyc8-00059a-Kz for qemu-devel@nongnu.org; Tue, 02 Jul 2013 07:19:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtyOH-0007Vv-DZ for qemu-devel@nongnu.org; Tue, 02 Jul 2013 07:04:57 -0400 Message-ID: <51D2B3CD.6040001@redhat.com> Date: Tue, 02 Jul 2013 13:04:45 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1372338695-411-1-git-send-email-pl@kamp.de> <1372338695-411-8-git-send-email-pl@kamp.de> <51D1E49D.2000600@redhat.com> <86E15AE3-6CAD-4A24-A084-F643A3F5C4F1@kamp.de> <51D29BEB.1090906@redhat.com> <51D2B020.6000308@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCHv2 07/11] iscsi: let bdrv_create conditionally zero out the device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, ronniesahlberg@gmail.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 02/07/2013 12:56, Peter Lieven ha scritto: > > Am 02.07.2013 um 12:49 schrieb Paolo Bonzini : > >> Il 02/07/2013 12:36, Peter Lieven ha scritto: >>>>>> Perhaps we can have a new "discard_zeroes" field in bdrv_get_info, and >>>>>> the unmap functionality can be moved up to qemu-img convert? >>>>> >>>>> Is there any other storage protocol out there that could benefit from it? >>>> >>>> Definitely LVM. Perhaps in the future gluster too, though right now it >>>> only supports discard on files, not block devices. >>> >>> Is discards on LVM sth that is already implemented in qemu? >> >> Yes, it supports BLKDISCARD (see handle_aiocb_discard in >> block/raw-posix.c). Of course there is no way to query the host >> discard_zeroes setting yet. > > No way in qemu or no way at all? No way in QEMU. Linux has the BLKDISCARDZEROES ioctl, it takes an int* as the third argument and puts 0/1 in it. Paolo