Patchwork [v2,5/9] vvfat: convert to .bdrv_co_is_allocated()

login
register
mail settings
Submitter Stefan Hajnoczi
Date Nov. 14, 2011, 12:44 p.m.
Message ID <1321274666-14041-6-git-send-email-stefanha@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/125524/
State New
Headers show

Comments

Stefan Hajnoczi - Nov. 14, 2011, 12:44 p.m.
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 <stefanha@linux.vnet.ibm.com>
---
 block/vvfat.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/block/vvfat.c b/block/vvfat.c
index 131680f..11dab50 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -2746,7 +2746,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;
@@ -2838,7 +2838,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",
 };