From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHtmb-0007z8-1N for qemu-devel@nongnu.org; Mon, 24 Feb 2014 06:33:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHtmV-0000N1-2z for qemu-devel@nongnu.org; Mon, 24 Feb 2014 06:33:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHtmU-0000Mp-Rw for qemu-devel@nongnu.org; Mon, 24 Feb 2014 06:33:07 -0500 Date: Mon, 24 Feb 2014 19:33:11 +0800 From: Fam Zheng Message-ID: <20140224113311.GA24100@T430.redhat.com> References: <1393074022-32388-1-git-send-email-pl@kamp.de> <20140222164512.GC16767@T430.redhat.com> <530A479E.4070900@kamp.de> <20140224010150.GA6840@T430.redhat.com> <530B216C.5050902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <530B216C.5050902@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH] block: optimize zero writes with bdrv_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: kwolf@redhat.com, Peter Lieven , qemu-devel@nongnu.org, stefanha@redhat.com On Mon, 02/24 11:39, Paolo Bonzini wrote: > Il 24/02/2014 02:01, Fam Zheng ha scritto: > > > >I would do this in qcow2: > > > > 1. In qcow2_co_writev, allocate cluster regardless of if data is zero or not. > > 2. If data is zero, set QCOW2_OFLAG_ZERO in L2. > > This is (or should be) bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP. But IIUC bdrv_co_write_zeroes without BDRV_REQ_MAY_UNMAP doesn't require cluster allocation if it's allocated yet, which is a bit different. Fam