static void virtio_blk_handle_write(BlockRequest *blkreq, int *num_writes,

    VirtIOBlockReq *req)

{

    if (req->out->sector & req->dev->sector_mask) {

        virtio_blk_rw_complete(req, -EIO);

        return;

    }



    if (*num_writes == 32) {

        do_multiwrite(req->dev->bs, blkreq, *num_writes);

        *num_writes = 0;

    }



    blkreq[*num_writes].sector = req->out->sector;

    blkreq[*num_writes].nb_sectors = req->qiov.size / BDRV_SECTOR_SIZE;

    blkreq[*num_writes].qiov = &req->qiov;

    blkreq[*num_writes].cb = virtio_blk_rw_complete;

    blkreq[*num_writes].opaque = req;

    blkreq[*num_writes].error = 0;



    (*num_writes)++;

}

static void virtio_blk_handle_write(BlockRequest *blkreq, int *num_writes,

    VirtIOBlockReq *req)

{

    if (req->out->sector & req->dev->sector_mask) {

        virtio_blk_rw_complete(req, -EIO);

        return;

    }



    if (*num_writes == 32) {

        do_multiwrite(req->dev->bs, blkreq, *num_writes);

        *num_writes = 0;

    }



    blkreq[*num_writes].sector = req->out->sector;

    blkreq[*num_writes].nb_sectors = req->qiov.size / BDRV_SECTOR_SIZE;

    blkreq[*num_writes].qiov = &req->qiov;

    blkreq[*num_writes].cb = virtio_blk_rw_complete;

    blkreq[*num_writes].opaque = req;

    blkreq[*num_writes].error = 0;



    (*num_writes)++;

}

static void FUNC_0(BlockRequest *VAR_0, int *VAR_1,

    VirtIOBlockReq *VAR_2)

{

    if (VAR_2->out->sector & VAR_2->dev->sector_mask) {

        virtio_blk_rw_complete(VAR_2, -EIO);

        return;

    }



    if (*VAR_1 == 32) {

        do_multiwrite(VAR_2->dev->bs, VAR_0, *VAR_1);

        *VAR_1 = 0;

    }



    VAR_0[*VAR_1].sector = VAR_2->out->sector;

    VAR_0[*VAR_1].nb_sectors = VAR_2->qiov.size / BDRV_SECTOR_SIZE;

    VAR_0[*VAR_1].qiov = &VAR_2->qiov;

    VAR_0[*VAR_1].cb = virtio_blk_rw_complete;

    VAR_0[*VAR_1].opaque = VAR_2;

    VAR_0[*VAR_1].error = 0;



    (*VAR_1)++;

}

static void FUNC_0(BlockRequest *VAR_0, int *VAR_1,
VirtIOBlockReq *VAR_2)
{ if (VAR_2->out->sector & VAR_2->dev->sector_mask) { virtio_blk_rw_complete(VAR_2, -EIO); return; } if (*VAR_1 == 32) { do_multiwrite(VAR_2->dev->bs, VAR_0, *VAR_1); *VAR_1 = 0; } VAR_0[*VAR_1].sector = VAR_2->out->sector; VAR_0[*VAR_1].nb_sectors = VAR_2->qiov.size / BDRV_SECTOR_SIZE; VAR_0[*VAR_1].qiov = &VAR_2->qiov; VAR_0[*VAR_1].cb = virtio_blk_rw_complete; VAR_0[*VAR_1].opaque = VAR_2; VAR_0[*VAR_1].error = 0; (*VAR_1)++; }