From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:46415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXZNP-0000Sh-Fp for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:18:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXZNJ-00008e-AT for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:18:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56286) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXZNJ-00008V-23 for qemu-devel@nongnu.org; Mon, 05 Dec 2011 09:18:33 -0500 From: Kevin Wolf Date: Mon, 5 Dec 2011 15:20:57 +0100 Message-Id: <1323094878-7967-21-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 20/41] block: use public bdrv_is_allocated() interface 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 There is no need for bdrv_commit() to use the BlockDriver .bdrv_is_allocated() interface directly. Converting to the public interface gives us the freedom to drop .bdrv_is_allocated() entirely in favor of a new .bdrv_co_is_allocated() in the future. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 5f979bd..0d5bee0 100644 --- a/block.c +++ b/block.c @@ -1013,7 +1013,7 @@ int bdrv_commit(BlockDriverState *bs) buf = g_malloc(COMMIT_BUF_SECTORS * BDRV_SECTOR_SIZE); for (sector = 0; sector < total_sectors; sector += n) { - if (drv->bdrv_is_allocated(bs, sector, COMMIT_BUF_SECTORS, &n)) { + if (bdrv_is_allocated(bs, sector, COMMIT_BUF_SECTORS, &n)) { if (bdrv_read(bs, sector, buf, n) != 0) { ret = -EIO; -- 1.7.6.4