qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 4/4] qcow2: Use block-queue


From: Stefan Hajnoczi
Subject: [Qemu-devel] Re: [PATCH 4/4] qcow2: Use block-queue
Date: Thu, 16 Dec 2010 17:58:38 +0000

On Mon, Dec 13, 2010 at 4:29 PM, Kevin Wolf <address@hidden> wrote:
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 537c479..e445913 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -136,6 +136,20 @@ static int qcow_read_extensions(BlockDriverState *bs, 
> uint64_t start_offset,
>     return 0;
>  }
>
> +static bool qcow_blkqueue_error_cb(void *opaque, int ret)
> +{
> +    BlockDriverState *bs = opaque;
> +    BlockErrorAction action = bdrv_get_on_error(bs, 0);
> +
> +    if ((action == BLOCK_ERR_STOP_ENOSPC && ret == -ENOSPC)
> +        || action == BLOCK_ERR_STOP_ANY)
> +    {
> +        bdrv_mon_event(bs, BDRV_ACTION_STOP, 0);
> +        return vm_stop(0);
> +    }
> +
> +    return false;
> +}

Not sure this is qcow2-specific.  Is it possible to put this in a
generic sysemu-specific place and qemu-tool.c?  That would allow the
vm_stop() change to be dropped.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]