Patchwork [RFC,1/3] block: add typedef for BlockDriverState queue

login
register
mail settings
Submitter Wayne Xia
Date Aug. 27, 2013, 7:49 a.m.
Message ID <1377589765-30215-2-git-send-email-xiawenc@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/270053/
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               |    2 +-
 include/block/block.h |    2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/block.c b/block.c
index a387c1a..9db3c32 100644
--- a/block.c
+++ b/block.c
@@ -93,7 +93,7 @@  static bool bdrv_exceed_iops_limits(BlockDriverState *bs, bool is_write,
 static bool bdrv_exceed_io_limits(BlockDriverState *bs, int nb_sectors,
         bool is_write, int64_t *wait);
 
-static QTAILQ_HEAD(, BlockDriverState) bdrv_states =
+static BlockDrvierStateQueue bdrv_states =
     QTAILQ_HEAD_INITIALIZER(bdrv_states);
 
 static QLIST_HEAD(, BlockDriver) bdrv_drivers =
diff --git a/include/block/block.h b/include/block/block.h
index 742fce5..b0d4f2b 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -86,6 +86,8 @@  typedef enum {
 } BlockErrorAction;
 
 typedef QSIMPLEQ_HEAD(BlockReopenQueue, BlockReopenQueueEntry) BlockReopenQueue;
+typedef QTAILQ_HEAD(BlockDrvierStateQueue, BlockDriverState) \
+        BlockDrvierStateQueue;
 
 typedef struct BDRVReopenState {
     BlockDriverState *bs;