From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:50760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REirF-0005yH-0G for qemu-devel@nongnu.org; Fri, 14 Oct 2011 10:35:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1REirA-0006AT-Ut for qemu-devel@nongnu.org; Fri, 14 Oct 2011 10:35:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:26409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1REirA-0006AK-GA for qemu-devel@nongnu.org; Fri, 14 Oct 2011 10:35:28 -0400 Message-ID: <4E984819.3010009@redhat.com> Date: Fri, 14 Oct 2011 16:32:57 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1318581692-18338-1-git-send-email-pbonzini@redhat.com> <1318581692-18338-5-git-send-email-pbonzini@redhat.com> <4E9845E6.3020905@redhat.com> <4E98463A.1010007@redhat.com> In-Reply-To: <4E98463A.1010007@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 4/4] block: add bdrv_co_discard and bdrv_aio_discard support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, stefanha@linux.vnet.ibm.com Am 14.10.2011 16:24, schrieb Paolo Bonzini: > On 10/14/2011 04:23 PM, Kevin Wolf wrote: >>> This similarly adds support for coroutine and asynchronous discard. >>> >>> Signed-off-by: Paolo Bonzini >> >> Do we really need bdrv_discard and bdrv_aio_discard in the backends? I >> think it makes sense to have a bdrv_aio_discard() in block.h as AIO >> generally fits well for device models, but I would just require >> bdrv_co_discard for any block drivers implementing discard. > > bdrv_discard is needed for now since I wouldn't like to conflate this > patch with the qcow2 patch. Okay, that makes sense. Then I'll drop it when I convert qcow2. > I can certainly drop aio_discard from the backends, but I'm not sure how > heavy can fallocate be (with FALLOC_FL_PUNCH_HOLE). Probably not much, > but I think there's no guarantee of O(1) behavior especially with > filesystems like ecryptfs. So you would need to go through the thread > pool and aio_discard would come in handy. Sure, but the coroutine interface should be just as good for implementing it this way in raw-posix. Kevin