[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] bdrv_aio_flush
From: |
Ian Jackson |
Subject: |
Re: [Qemu-devel] [PATCH] bdrv_aio_flush |
Date: |
Tue, 2 Sep 2008 11:52:24 +0100 |
Andrea Arcangeli writes ("Re: [Qemu-devel] [PATCH] bdrv_aio_flush"):
> In case you meant fsync is just fine, Linux will use the
> WIN_FLUSH_CACHE/WIN_FLUSH_CACHE_EXT see
> idedisk_prepare_flush:
>
> if (barrier) {
> ordered = QUEUE_ORDERED_DRAIN_FLUSH;
> prep_fn = idedisk_prepare_flush;
> }
I'm not sure I follow but I'm not familiar with the relevant Linux
code. Do you mean that Linux does this
submit IO 1 to device
submit flush to device
collect IO 1 completion
collect flush completion
and then expects IO 1 to be on disk ?
If this is a documented behaviour of the controller or device we're
emulating then I think the qemu emulation (hw/scsi-disk.c or whatever)
should do an aio_flush barrier before aio_fsync.
What spec should I be referring to ?
Perhaps I'm naive but I would expect the device interface to look more
like the kernel syscall interface, whose specification text (in SuSv3)
I analysed in April in
http://lists.nongnu.org/archive/html/qemu-devel/2008-04/msg00046.html
Ian.