[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 01/17] block: stop relying on io_flush() in b
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v4 01/17] block: stop relying on io_flush() in bdrv_drain_all() |
Date: |
Thu, 27 Jun 2013 15:29:38 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jun 27, 2013 at 03:13:19PM +0200, Paolo Bonzini wrote:
> Il 14/06/2013 13:43, Stefan Hajnoczi ha scritto:
> > If a block driver has no file descriptors to monitor but there are still
> > active requests, it can return 1 from .io_flush(). This is used to spin
> > during synchronous I/O.
> >
> > Stop relying on .io_flush() and instead check
> > QLIST_EMPTY(&bs->tracked_requests) to decide whether there are active
> > requests.
> >
> > This is the first step in removing .io_flush() so that event loops no
> > longer need to have the concept of synchronous I/O. Eventually we may
> > be able to kill synchronous I/O completely by running everything in a
> > coroutine, but that is future work.
> >
> > Note this patch moves bs->throttled_reqs initialization to bdrv_new() so
> > that bdrv_requests_pending(bs) can safely access it. In practice bs is
> > g_malloc0() so the memory is already zeroed but it's safer to initialize
> > the queue properly.
> >
> > In bdrv_delete() make sure to call bdrv_make_anon() *after* bdrv_close()
> > so that the device is still seen by bdrv_drain_all() when iterating
> > bdrv_states.
>
> I wonder if this last change should be separated out and CCed to
> qemu-stable. It seems like a bug if you close a device that has pending
> throttled operations.
Seems like a good idea. I'll send the next version with a separated Cc:
address@hidden patch.
Stefan
- [Qemu-devel] [PATCH v4 00/17] aio: drop io_flush(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 01/17] block: stop relying on io_flush() in bdrv_drain_all(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 04/17] tests: adjust test-thread-pool to new aio_poll() semantics, Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 06/17] block/curl: drop curl_aio_flush(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 07/17] block/gluster: drop qemu_gluster_aio_flush_cb(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 08/17] block/iscsi: drop iscsi_process_flush(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 09/17] block/linux-aio: drop qemu_laio_completion_cb(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 10/17] block/nbd: drop nbd_have_request(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 11/17] block/rbd: drop qemu_rbd_aio_flush_cb(), Stefan Hajnoczi, 2013/06/14
- [Qemu-devel] [PATCH v4 02/17] dataplane/virtio-blk: check exit conditions before aio_poll(), Stefan Hajnoczi, 2013/06/14