From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzNO1-0007Ys-SH for qemu-devel@nongnu.org; Wed, 17 Jul 2013 04:47:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UzNO0-0005NW-35 for qemu-devel@nongnu.org; Wed, 17 Jul 2013 04:47:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UzNNz-0005NL-RZ for qemu-devel@nongnu.org; Wed, 17 Jul 2013 04:47:00 -0400 Date: Wed, 17 Jul 2013 10:46:49 +0200 From: Kevin Wolf Message-ID: <20130717084648.GD2458@dhcp-200-207.str.redhat.com> References: <1373885375-13601-1-git-send-email-pl@kamp.de> <1373885375-13601-5-git-send-email-pl@kamp.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1373885375-13601-5-git-send-email-pl@kamp.de> Subject: Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: pbonzini@redhat.com, ronniesahlberg@gmail.com, qemu-devel@nongnu.org, stefanha@redhat.com Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: > if a destination has has_zero_init = 0, but it supports > discard zeroes use discard to convert the target > into an all zero device. > > Signed-off-by: Peter Lieven Wouldn't it be better to use bdrv_write_zeroes() and extend the implementation of that to use discard internally in those block drivers where it makes sense? Because here you're not really discarding (i.e. don't care about the sectors any more), but you want them to be zeroed. Kevin