From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60509) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz2vS-0004Et-7B for qemu-devel@nongnu.org; Tue, 16 Jul 2013 06:56:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz2vM-0005dM-LA for qemu-devel@nongnu.org; Tue, 16 Jul 2013 06:56:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4273) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz2vM-0005d3-Bt for qemu-devel@nongnu.org; Tue, 16 Jul 2013 06:56:04 -0400 Message-ID: <51E526B3.9070203@redhat.com> Date: Tue, 16 Jul 2013 12:55:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1373885375-13601-1-git-send-email-pl@kamp.de> In-Reply-To: <1373885375-13601-1-git-send-email-pl@kamp.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/4] qemu-img: conditionally discard target on convert 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 15/07/2013 12:49, Peter Lieven ha scritto: > this adds the proposed solution to add a generic mechanism to zeroize > a target in qemu-img if it has discard_zeroes but has_zero_init is 0. > > Peter Lieven (4): > block: add discard_zeroes and max_unmap to BlockDriverInfo > iscsi: add .bdrv_get_info > block/raw: add .bdrv_get_info > qemu-img: conditionally discard target on convert > > block/iscsi.c | 19 +++++++++++++++-- > block/raw.c | 6 ++++++ > include/block/block.h | 5 +++++ > qemu-img.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++- > 4 files changed, 83 insertions(+), 3 deletions(-) > Looks good. Perhaps, as a followup, you can use max_unmap (which I'd rename to max_discard) in bdrv_co_discard to support splitting the request. You could also export the discard alignment in BlockDriverInfo. Paolo