From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60040) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBSxq-0000mh-8E for qemu-devel@nongnu.org; Sat, 24 Mar 2012 11:33:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SBSxo-00079H-Lf for qemu-devel@nongnu.org; Sat, 24 Mar 2012 11:33:09 -0400 Received: from verein.lst.de ([213.95.11.211]:52366 helo=newverein.lst.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SBSxo-00076D-F3 for qemu-devel@nongnu.org; Sat, 24 Mar 2012 11:33:08 -0400 Date: Sat, 24 Mar 2012 16:33:07 +0100 From: Christoph Hellwig Message-ID: <20120324153307.GD13014@lst.de> References: <4F5A31B2.3050701@redhat.com> <4F5A46A1.4000508@redhat.com> <1331402560.8577.46.camel@watermelon.coderich.net> <4F5DEBCE.3040409@redhat.com> <1331665990.24052.42.camel@watermelon.coderich.net> <4F604B98.9090606@redhat.com> <4F60889F.6030401@redhat.com> <4F608B9A.8040406@redhat.com> <4F60911E.6030201@redhat.com> <4F6093EC.2090303@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F6093EC.2090303@redhat.com> Subject: Re: [Qemu-devel] [RFC PATCH 06/17] block: use bdrv_{co, aio}_discard for write_zeroes operations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , Richard Laager , qemu-devel@nongnu.org On Wed, Mar 14, 2012 at 01:49:48PM +0100, Paolo Bonzini wrote: > It does make the distinction. "I don't care" is UNMAP (or WRITE > SAME(16) with the UNMAP bit set); "I want to have zeroes" is WRITE > SAME(10) or WRITE SAME(16) with an all-zero payload. But once the taget sets the unmap zeroes data bit even UNMAP / WRITE SAME with unmap have to zero all blocks touched. Also strictly speaking even the WRITE SAME with unmap requires a payload of zeroes, even if most targets don't bother to check for this.