From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXZNT-0000eM-68 for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:18:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXZNO-0000I6-7k for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:18:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXZNN-0000Ho-PP for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:18:38 -0500 From: Kevin Wolf Date: Mon, 5 Dec 2011 15:21:01 +0100 Message-Id: <1323094878-7967-25-git-send-email-kwolf@redhat.com> In-Reply-To: <1323094878-7967-1-git-send-email-kwolf@redhat.com> References: <1323094878-7967-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PATCH 24/41] vvfat: convert to .bdrv_co_is_allocated() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: anthony@codemonkey.ws Cc: kwolf@redhat.com, qemu-devel@nongnu.org From: Stefan Hajnoczi It is trivial to switch from the synchronous .bdrv_is_allocated() interface to .bdrv_co_is_allocated() since vvfat_is_allocated() does not block. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/vvfat.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index a310ce8..eeffc4a 100644 --- a/block/vvfat.c +++ b/block/vvfat.c @@ -2758,7 +2758,7 @@ static coroutine_fn int vvfat_co_write(BlockDriverState *bs, int64_t sector_num, return ret; } -static int vvfat_is_allocated(BlockDriverState *bs, +static int coroutine_fn vvfat_co_is_allocated(BlockDriverState *bs, int64_t sector_num, int nb_sectors, int* n) { BDRVVVFATState* s = bs->opaque; @@ -2855,7 +2855,7 @@ static BlockDriver bdrv_vvfat = { .bdrv_read = vvfat_co_read, .bdrv_write = vvfat_co_write, .bdrv_close = vvfat_close, - .bdrv_is_allocated = vvfat_is_allocated, + .bdrv_co_is_allocated = vvfat_co_is_allocated, .protocol_name = "fat", }; -- 1.7.6.4