[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 09/25] iscsi: implement .bdrv_detach/attach_a
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v2 09/25] iscsi: implement .bdrv_detach/attach_aio_context() |
Date: |
Thu, 8 May 2014 15:40:57 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, May 07, 2014 at 04:14:31PM +0200, Peter Lieven wrote:
> On 07.05.2014 12:27, Stefan Hajnoczi wrote:
> >Drop the assumption that we're using the main AioContext for Linux
> >AIO. Convert qemu_aio_set_fd_handler() to aio_set_fd_handler() and
> >timer_new_ms() to aio_timer_new().
> >
> >The .bdrv_detach/attach_aio_context() interfaces also need to be
> >implemented to move the fd and timer from the old to the new AioContext.
> >
> >Cc: Peter Lieven <address@hidden>
> >Cc: Ronnie Sahlberg <address@hidden>
> >Signed-off-by: Stefan Hajnoczi <address@hidden>
> >---
> > block/iscsi.c | 79
> > +++++++++++++++++++++++++++++++++++++++++------------------
> > 1 file changed, 55 insertions(+), 24 deletions(-)
> >
> >diff --git a/block/iscsi.c b/block/iscsi.c
> >index a30202b..81e3ebd 100644
> >--- a/block/iscsi.c
> >+++ b/block/iscsi.c
> >@@ -47,6 +47,7 @@
> > typedef struct IscsiLun {
> > struct iscsi_context *iscsi;
> >+ AioContext *aio_context;
> > int lun;
> > enum scsi_inquiry_peripheral_device_type type;
> > int block_size;
> >@@ -69,6 +70,7 @@ typedef struct IscsiTask {
> > struct scsi_task *task;
> > Coroutine *co;
> > QEMUBH *bh;
> >+ AioContext *aio_context;
>
> If you need to respin I would copy the pointer to the whole IscsiLun struct
> just
> in case we need access to any other member in the future.
Fixed in v3. Also using IscsiLun->aio_context where possible instead of
calling bdrv_get_aio_context(bs) so the field is used consistently.
Stefan
- [Qemu-devel] [PATCH v2 01/25] block: use BlockDriverState AioContext, (continued)
- [Qemu-devel] [PATCH v2 01/25] block: use BlockDriverState AioContext, Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 05/25] blkdebug: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 03/25] block: acquire AioContext in bdrv_drain_all(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 06/25] blkverify: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 04/25] block: add bdrv_set_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 07/25] curl: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 10/25] nbd: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 08/25] gluster: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 09/25] iscsi: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 12/25] qed: use BlockDriverState's AioContext, Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 14/25] block/raw-posix: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 13/25] quorum: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 15/25] block/linux-aio: fix memory and fd leak, Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 16/25] block/raw-win32: create one QEMUWin32AIOState per BDRVRawState, Stefan Hajnoczi, 2014/05/07
- [Qemu-devel] [PATCH v2 11/25] nfs: implement .bdrv_detach/attach_aio_context(), Stefan Hajnoczi, 2014/05/07