static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,

    int is_read)

{

    BlockInterfaceErrorAction action =

        drive_get_on_error(req->dev->bs, is_read);

    VirtIOBlock *s = req->dev;



    if (action == BLOCK_ERR_IGNORE) {

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_IGNORE, is_read);

        return 0;

    }



    if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)

            || action == BLOCK_ERR_STOP_ANY) {

        req->next = s->rq;

        s->rq = req;

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_STOP, is_read);

        vm_stop(0);

    } else {

        virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_REPORT, is_read);

    }



    return 1;

}

static int virtio_blk_handle_rw_error(VirtIOBlockReq *req, int error,

    int is_read)

{

    BlockInterfaceErrorAction action =

        drive_get_on_error(req->dev->bs, is_read);

    VirtIOBlock *s = req->dev;



    if (action == BLOCK_ERR_IGNORE) {

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_IGNORE, is_read);

        return 0;

    }



    if ((error == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)

            || action == BLOCK_ERR_STOP_ANY) {

        req->next = s->rq;

        s->rq = req;

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_STOP, is_read);

        vm_stop(0);

    } else {

        virtio_blk_req_complete(req, VIRTIO_BLK_S_IOERR);

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_REPORT, is_read);

    }



    return 1;

}

        bdrv_mon_event(req->dev->bs, BDRV_ACTION_IGNORE, is_read);         bdrv_mon_event(req->dev->bs, BDRV_ACTION_STOP, is_read);         bdrv_mon_event(req->dev->bs, BDRV_ACTION_REPORT, is_read);
static int FUNC_0(VirtIOBlockReq *VAR_0, int VAR_1,

    int VAR_2)

{

    BlockInterfaceErrorAction action =

        drive_get_on_error(VAR_0->dev->bs, VAR_2);

    VirtIOBlock *s = VAR_0->dev;



    if (action == BLOCK_ERR_IGNORE) {

        bdrv_mon_event(VAR_0->dev->bs, BDRV_ACTION_IGNORE, VAR_2);

        return 0;

    }



    if ((VAR_1 == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)

            || action == BLOCK_ERR_STOP_ANY) {

        VAR_0->next = s->rq;

        s->rq = VAR_0;

        bdrv_mon_event(VAR_0->dev->bs, BDRV_ACTION_STOP, VAR_2);

        vm_stop(0);

    } else {

        virtio_blk_req_complete(VAR_0, VIRTIO_BLK_S_IOERR);

        bdrv_mon_event(VAR_0->dev->bs, BDRV_ACTION_REPORT, VAR_2);

    }



    return 1;

}

static int FUNC_0(VirtIOBlockReq *VAR_0, int VAR_1,
int VAR_2)
{ BlockInterfaceErrorAction action =
drive_get_on_error(VAR_0->dev->bs, VAR_2); VirtIOBlock *s = VAR_0->dev; if (action == BLOCK_ERR_IGNORE) { bdrv_mon_event(VAR_0->dev->bs, BDRV_ACTION_IGNORE, VAR_2); return 0; } if ((VAR_1 == ENOSPC && action == BLOCK_ERR_STOP_ENOSPC)
|| action == BLOCK_ERR_STOP_ANY) { VAR_0->next = s->rq; s->rq = VAR_0; bdrv_mon_event(VAR_0->dev->bs, BDRV_ACTION_STOP, VAR_2); vm_stop(0); } else { virtio_blk_req_complete(VAR_0, VIRTIO_BLK_S_IOERR); bdrv_mon_event(VAR_0->dev->bs, BDRV_ACTION_REPORT, VAR_2); } return 1; }