[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 01/10] block: use public bdrv_is_allocated() interfa
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PATCH 01/10] block: use public bdrv_is_allocated() interface |
Date: |
Fri, 11 Nov 2011 16:47:13 +0000 |
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 <address@hidden>
---
block.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block.c b/block.c
index 9bb236c..e6ac6d3 100644
--- a/block.c
+++ b/block.c
@@ -915,7 +915,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.7.1
[Qemu-devel] [PATCH 05/10] vvfat: use public block layer interface, Stefan Hajnoczi, 2011/11/11