Patchwork [v11,5/5] lsllsls

login
register
mail settings
Submitter Zhi Yong Wu
Date Nov. 2, 2011, 6:01 a.m.
Message ID <1320213705-8097-6-git-send-email-wuzhy@linux.vnet.ibm.com>
Download mbox | patch
Permalink /patch/123227/
State New
Headers show

Comments

Zhi Yong Wu - Nov. 2, 2011, 6:01 a.m.
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
 block.c           |    2 +-
 block/qed-table.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Zhiyong Wu - Nov. 2, 2011, 6:09 a.m.
Sorry, pls ignore this.

On Wed, Nov 2, 2011 at 2:01 PM, Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> wrote:
> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
> ---
>  block.c           |    2 +-
>  block/qed-table.c |    6 +++---
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/block.c b/block.c
> index 8ff522c..9936d7f 100644
> --- a/block.c
> +++ b/block.c
> @@ -2838,7 +2838,7 @@ typedef struct BlockDriverAIOCBCoroutine {
>     BlockDriverAIOCB common;
>     BlockRequest req;
>     bool is_write;
> -    QEMUBH* bh;
> +    QEMUBH *bh;
>  } BlockDriverAIOCBCoroutine;
>
>  static void bdrv_aio_co_cancel_em(BlockDriverAIOCB *blockacb)
> diff --git a/block/qed-table.c b/block/qed-table.c
> index f31f9ff..8ee8443 100644
> --- a/block/qed-table.c
> +++ b/block/qed-table.c
> @@ -29,7 +29,7 @@ static void qed_read_table_cb(void *opaque, int ret)
>  {
>     QEDReadTableCB *read_table_cb = opaque;
>     QEDTable *table = read_table_cb->table;
> -    int noffsets = read_table_cb->iov.iov_len / sizeof(uint64_t);
> +    int noffsets = read_table_cb->qiov.size / sizeof(uint64_t);
>     int i;
>
>     /* Handle I/O error */
> @@ -65,7 +65,7 @@ static void qed_read_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
>
>     qemu_iovec_init_external(qiov, &read_table_cb->iov, 1);
>     aiocb = bdrv_aio_readv(s->bs->file, offset / BDRV_SECTOR_SIZE, qiov,
> -                           read_table_cb->iov.iov_len / BDRV_SECTOR_SIZE,
> +                           qiov->size / BDRV_SECTOR_SIZE,
>                            qed_read_table_cb, read_table_cb);
>     if (!aiocb) {
>         qed_read_table_cb(read_table_cb, -EIO);
> @@ -160,7 +160,7 @@ static void qed_write_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
>
>     aiocb = bdrv_aio_writev(s->bs->file, offset / BDRV_SECTOR_SIZE,
>                             &write_table_cb->qiov,
> -                            write_table_cb->iov.iov_len / BDRV_SECTOR_SIZE,
> +                            write_table_cb->qiov.size / BDRV_SECTOR_SIZE,
>                             qed_write_table_cb, write_table_cb);
>     if (!aiocb) {
>         qed_write_table_cb(write_table_cb, -EIO);
> --
> 1.7.6
>
>

Patch

diff --git a/block.c b/block.c
index 8ff522c..9936d7f 100644
--- a/block.c
+++ b/block.c
@@ -2838,7 +2838,7 @@  typedef struct BlockDriverAIOCBCoroutine {
     BlockDriverAIOCB common;
     BlockRequest req;
     bool is_write;
-    QEMUBH* bh;
+    QEMUBH *bh;
 } BlockDriverAIOCBCoroutine;
 
 static void bdrv_aio_co_cancel_em(BlockDriverAIOCB *blockacb)
diff --git a/block/qed-table.c b/block/qed-table.c
index f31f9ff..8ee8443 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -29,7 +29,7 @@  static void qed_read_table_cb(void *opaque, int ret)
 {
     QEDReadTableCB *read_table_cb = opaque;
     QEDTable *table = read_table_cb->table;
-    int noffsets = read_table_cb->iov.iov_len / sizeof(uint64_t);
+    int noffsets = read_table_cb->qiov.size / sizeof(uint64_t);
     int i;
 
     /* Handle I/O error */
@@ -65,7 +65,7 @@  static void qed_read_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
 
     qemu_iovec_init_external(qiov, &read_table_cb->iov, 1);
     aiocb = bdrv_aio_readv(s->bs->file, offset / BDRV_SECTOR_SIZE, qiov,
-                           read_table_cb->iov.iov_len / BDRV_SECTOR_SIZE,
+                           qiov->size / BDRV_SECTOR_SIZE,
                            qed_read_table_cb, read_table_cb);
     if (!aiocb) {
         qed_read_table_cb(read_table_cb, -EIO);
@@ -160,7 +160,7 @@  static void qed_write_table(BDRVQEDState *s, uint64_t offset, QEDTable *table,
 
     aiocb = bdrv_aio_writev(s->bs->file, offset / BDRV_SECTOR_SIZE,
                             &write_table_cb->qiov,
-                            write_table_cb->iov.iov_len / BDRV_SECTOR_SIZE,
+                            write_table_cb->qiov.size / BDRV_SECTOR_SIZE,
                             qed_write_table_cb, write_table_cb);
     if (!aiocb) {
         qed_write_table_cb(write_table_cb, -EIO);