Revision 23e9a39e block/qed-table.c

b/block/qed-table.c
29 29
{
30 30
    QEDReadTableCB *read_table_cb = opaque;
31 31
    QEDTable *table = read_table_cb->table;
32
    int noffsets = read_table_cb->iov.iov_len / sizeof(uint64_t);
32
    int noffsets = read_table_cb->qiov.size / sizeof(uint64_t);
33 33
    int i;
34 34

  
35 35
    /* Handle I/O error */
......
65 65

  
66 66
    qemu_iovec_init_external(qiov, &read_table_cb->iov, 1);
67 67
    aiocb = bdrv_aio_readv(s->bs->file, offset / BDRV_SECTOR_SIZE, qiov,
68
                           read_table_cb->iov.iov_len / BDRV_SECTOR_SIZE,
68
                           qiov->size / BDRV_SECTOR_SIZE,
69 69
                           qed_read_table_cb, read_table_cb);
70 70
    if (!aiocb) {
71 71
        qed_read_table_cb(read_table_cb, -EIO);
......
160 160

  
161 161
    aiocb = bdrv_aio_writev(s->bs->file, offset / BDRV_SECTOR_SIZE,
162 162
                            &write_table_cb->qiov,
163
                            write_table_cb->iov.iov_len / BDRV_SECTOR_SIZE,
163
                            write_table_cb->qiov.size / BDRV_SECTOR_SIZE,
164 164
                            qed_write_table_cb, write_table_cb);
165 165
    if (!aiocb) {
166 166
        qed_write_table_cb(write_table_cb, -EIO);

Also available in: Unified diff