aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>2011-11-14 12:44:18 +0000
committerKevin Wolf <kwolf@redhat.com>2011-12-05 14:51:36 +0100
commit05c4af54c670f5143bd4ac5d79aa1ef53a9f31ca (patch)
treebea330d964c045a5f1ed47f1f03398118b390fa1
parente3f652b33228e16e117a93fb919c4e1e4753f5a5 (diff)
downloadqemu-05c4af54c670f5143bd4ac5d79aa1ef53a9f31ca.zip
qemu-05c4af54c670f5143bd4ac5d79aa1ef53a9f31ca.tar.gz
qemu-05c4af54c670f5143bd4ac5d79aa1ef53a9f31ca.tar.bz2
block: use public bdrv_is_allocated() interface
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 <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block.c2
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;