[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug
From: |
Christoph Hellwig |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug() |
Date: |
Sat, 30 Oct 2010 15:25:33 +0200 |
User-agent: |
Mutt/1.3.28i |
On Fri, Oct 29, 2010 at 06:08:03PM +0200, Kevin Wolf wrote:
> > I think we've got a bit of a problem.
> >
> > We have:
> >
> > 1) bdrv_flush() - sends an fdatasync
> >
> > 2) bdrv_aio_flush() - sends an fdatasync using the thread pool
> >
> > 3) qemu_aio_flush() - waits for all pending aio requests to complete
> >
> > But we use bdrv_aio_flush() to implement a barrier and we don't actually
> > preserve those barrier semantics in the thread pool.
>
> Not really. We use it to implement flush commands, which I think don't
> necessarily constitute a barrier by themselves.
Yes. Just as with normal disks qemu has absolutely no concept of I/O
barriers. I/O barriers is an abstraction inside the Linux kernel that
we fortunately finally got rid of.
Qemu just gets a cache flush command from the guest and executes it.
Usuaully asynchronously as synchronous block I/O with a single
outstanding request is not very performant. The filesystem in the guest
handles the ordering around it.
> bdrv_aio_flush, as I understand it, is meant to flush only completed
> writes.
Exactly. The guest OS tracks writes and only issues a cache flush if
all I/Os it wants to see flushes have been ACKed by the storage hardware
/ qemu.
- [Qemu-devel] [PATCH 0/3] v4 Decouple block device removal from device removal, Ryan Harper, 2010/10/25
- [Qemu-devel] [PATCH 3/3] Add qmp version of drive_unplug, Ryan Harper, 2010/10/25
- [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Ryan Harper, 2010/10/25
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Markus Armbruster, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Anthony Liguori, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Kevin Wolf, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Anthony Liguori, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Kevin Wolf, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Anthony Liguori, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Kevin Wolf, 2010/10/29
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(),
Christoph Hellwig <=
- Re: [Qemu-devel] [PATCH 2/3] v2 Fix Block Hotplug race with drive_unplug(), Markus Armbruster, 2010/10/29
[Qemu-devel] [PATCH 1/3] v2 Add drive_get_by_id, Ryan Harper, 2010/10/25
Re: [Qemu-devel] [PATCH 0/3] v4 Decouple block device removal from device removal, Markus Armbruster, 2010/10/29