WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Windows Bug Check 0x101 issue
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
Date: Mon, 24 Mar 2008 11:01:24 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 24 Mar 2008 04:02:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <7k4pawfnxs.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>, Kouya Shimura <kouya@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
References: <7k4pawfnxs.fsf@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
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