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

Re: [Xen-devel] Windows Bug Check 0x101 issue



Kouya Shimura, le Mon 24 Mar 2008 18:53:18 +0900, a écrit :
Content-Description: message body text
> An attached patch fixes it. However I think the root cause is
> that a timer event can't interrupt an i/o emulation.

The way qemu is designed wouldn't permit that anyway.

> How should we fix it?

We need to change the behavior of the flush operation, to make it
asynchronous, so that things can continue while the host OS is syncing,
and eventually the SCSI or IDE layer will report the completion of the
flush.

> +static void aio_fsync_cb(void *opague, int ret)
> +{
> +}
>  #endif
>  
>  static void raw_close(BlockDriverState *bs)
> @@ -602,8 +606,20 @@ static int raw_create(const char *filena
>  
>  static void raw_flush(BlockDriverState *bs)
>  {
> +#ifdef NO_AIO
>      BDRVRawState *s = bs->opaque;
>      fsync(s->fd);
> +#else
> +    RawAIOCB *acb;
> +
> +    acb = raw_aio_setup(bs, 0, NULL, 0, aio_fsync_cb, NULL);
> +    if (!acb)
> +        return;
> +    if (aio_fsync(O_SYNC, &acb->aiocb) < 0) {
> +        qemu_aio_release(acb);
> +        return;
> +    }
> +#endif
>  }

That's not correct: callers of bdrv_flush() assume that when it returns,
data _is_ on the disk.  We need to change that assumption, so that
your code becomes correct (and reports asynchronous completion from
aio_fsync_cb).

Samuel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.