Patchwork [RFC,3/3] block: add parameter bds queue in bdrv_invalidate_cache_all()

login
register
mail settings
Submitter Wayne Xia
Date Aug. 27, 2013, 7:49 a.m.
Message ID <1377589765-30215-4-git-send-email-xiawenc@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/270054/
State New
Headers show

Comments

Wayne Xia - Aug. 27, 2013, 7:49 a.m.
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 block.c               |    4 ++--
 include/block/block.h |    2 +-
 migration.c           |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

Patch

diff --git a/block.c b/block.c
index bf35b90..e4dd84e 100644
--- a/block.c
+++ b/block.c
@@ -4175,11 +4175,11 @@  void bdrv_invalidate_cache(BlockDriverState *bs)
     }
 }
 
-void bdrv_invalidate_cache_all(void)
+void bdrv_invalidate_cache_all(BlockDrvierStateQueue *q)
 {
     BlockDriverState *bs;
 
-    QTAILQ_FOREACH(bs, &bdrv_states, list) {
+    QTAILQ_FOREACH(bs, q, list) {
         bdrv_invalidate_cache(bs);
     }
 }
diff --git a/include/block/block.h b/include/block/block.h
index 323a732..3762fe1 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -267,7 +267,7 @@  BlockDriverAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
 
 /* Invalidate any cached metadata used by image formats */
 void bdrv_invalidate_cache(BlockDriverState *bs);
-void bdrv_invalidate_cache_all(void);
+void bdrv_invalidate_cache_all(BlockDrvierStateQueue *q);
 
 void bdrv_clear_incoming_migration_all(void);
 
diff --git a/migration.c b/migration.c
index 200d404..3153f20 100644
--- a/migration.c
+++ b/migration.c
@@ -113,7 +113,7 @@  static void process_incoming_migration_co(void *opaque)
 
     bdrv_clear_incoming_migration_all();
     /* Make sure all file formats flush their mutable metadata */
-    bdrv_invalidate_cache_all();
+    bdrv_invalidate_cache_all(qemu_get_bds_queue());
 
     if (autostart) {
         vm_start();