From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S62fp-0000AN-TN for qemu-devel@nongnu.org; Fri, 09 Mar 2012 11:28:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S62fg-00008w-6N for qemu-devel@nongnu.org; Fri, 09 Mar 2012 11:28:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S62ff-00008O-Vc for qemu-devel@nongnu.org; Fri, 09 Mar 2012 11:28:00 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q29GRw1Z016779 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 9 Mar 2012 11:27:58 -0500 Message-ID: <4F5A3060.8070003@redhat.com> Date: Fri, 09 Mar 2012 17:31:28 +0100 From: Kevin Wolf MIME-Version: 1.0 References: <1331226917-6658-1-git-send-email-pbonzini@redhat.com> <1331226917-6658-5-git-send-email-pbonzini@redhat.com> In-Reply-To: <1331226917-6658-5-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 04/17] qed: implement bdrv_aio_discard List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org Am 08.03.2012 18:15, schrieb Paolo Bonzini: > Move the bdrv_co_write_zeroes operation to bdrv_aio_discard, so that > the ugly coroutine loop can be eliminated. > > Signed-off-by: Paolo Bonzini But the logically correct (and therefore easier to understand) way would be to let bdrv_aio_discard call bdrv_co_write_zeroes instead of the other way round. Mapping write_zeroes to discard is only correct as long as QED implements discard as zero writes instead of really discarding data. Kevin