On Mon, Dec 13, 2010 at 4:29 PM, Kevin Wolf <kw...@redhat.com> 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