summaryrefslogtreecommitdiffstats
path: root/block
Commit message (Collapse)AuthorAgeFilesLines
* Fix new typos (found by codespell)Stefan Weil2014-06-241-1/+1
| | | | | | | | | | | | * accomodate -> accommodate * aquiring -> acquiring * beacuse -> because * loosing -> losing * prefering -> preferring * threshhold -> threshold Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* qapi event: convert QUORUM eventsWenchao Xia2014-06-231-17/+8
| | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi event: convert other BLOCK_JOB eventsWenchao Xia2014-06-231-1/+1
| | | | | | | | | | | Since BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are related, convert them in one patch. The block_job_event_* functions are used to keep encapsulation of BlockJob structure. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi event: convert BLOCK_IMAGE_CORRUPTEDWenchao Xia2014-06-231-6/+8
| | | | | | | Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* qapi: adjust existing definesWenchao Xia2014-06-233-6/+7
| | | | | | | | | | | | | | | In order to let event defines use existing types later, instead of redefine new ones, some old type defines for spice and vnc are changed, and BlockErrorAction is moved from block.h to qapi schema. Note that BlockErrorAction is not merged with BlockdevOnError. At this point, VncInfo is not made a child of VncBasicInfo, because VncBasicInfo has mandatory fields where VncInfo makes them optional. Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* sheepdog: fix NULL dereference in sd_createLiu Yuan2014-06-231-0/+1
| | | | | | | | | | | | | | | Following command qemu-img create -f qcow2 sheepdog:test 20g will cause core dump because aio_context is NULL in sd_create. We should initialize it by qemu_get_aio_context() to avoid NULL dereference. Cc: qemu-devel@nongnu.org Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/iscsi: drop obsolete pointers from iscsi_co_writevPeter Lieven2014-06-181-7/+2
| | | | | Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: fix init value for iTask->retriesPeter Lieven2014-06-181-1/+0
| | | | | | | | | during rebasing the changed init value for the retry counter was missed. This resulted in no retries being performed at all. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: bump libiscsi requirement to 1.9.0Peter Lieven2014-06-181-67/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch lifts the minimum supported libiscsi version from 1.4.0 to 1.9.0 since the BUSY patch required that change. On one this allows us to remove all #ifdefs from the code which makes the code easier to maintain and read. On the other hand I would not recommend libiscsi prior to 1.8.0 for production use because the following important libiscsi fixes for deadlocks and protocol errors are missing prior to 1.8.0: dbe9a1e SOCKET queue cmd PDUs directly in waitpdu queue 30df192 DATA-OUT set pdu->cmdsn appropriately 548bd22 ISCSI fix broken send logic in iscsi_scsi_async_command 14bee10 RECONNECT do not increase CmdSN for immediate PDUs 1f4a66a PDU queue out PDUs in order of itt. 562dd46 PDU avoid incrementing itt to 0xffffffff cd09c0f PDU use serial32 arithmetic for cmdsn, maxcmdsn and expcmdsn. 89e918e SOCKET validate data_size in in_pdu header 91267f5 Limit immediate and unsolicited data to FirstBurstLength Note that libiscsi 1.9.0 was released on Feb 24th, 2013, about one month after 1.8.0. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: use 16 byte CDBs only when necessaryPeter Lieven2014-06-181-18/+40
| | | | | | | | | | | | | | | | | this patch changes the driver to uses 16 Byte CDBs for READ/WRITE only if the target requires 64bit lba addressing. On one hand this saves 6 bytes in each PDU on the other hand it seems that 10 Byte CDBs seems to be much better supported and tested as a recent issue I had with a major storage supplier lined out. For WRITESAME the logic is a bit more tricky as WRITESAME10 with UNMAP was added really late. Thus a fallback to WRITESAME16 is possible if it supports UNMAP and WRITESAME10 not. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: fix potential segfault on early callbackPeter Lieven2014-06-181-1/+4
| | | | | | | | | it might happen in the future that a function directly invokes its callback. In this case we end up in a segfault because the iTask is gone when the BH is scheduled. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: handle BUSY conditionPeter Lieven2014-06-181-12/+43
| | | | | | | | | | | | | | | | | | | | this patch adds handling of BUSY status reponse from an iSCSI target. Currently, we fail with -EIO in case of SCSI_STATUS_BUSY while the obvious reaction would be to retry the operation after some time. The retry time is randomly choosen from a range with exponential growth increasing with each retry. This patch includes most of the changes by a an upcoming patch from Stefan Hajnoczi: iscsi: implement .bdrv_detach/attach_aio_context() because I also need the reference to the aio_context for the retry timer to work. I included the changes to maintain better mergeability. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* cleanup QEMUOptionParameterChunyan Liu2014-06-1618-47/+37
| | | | | | | | | Now that all backend drivers are using QemuOpts, remove all QEMUOptionParameter related codes. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vpc.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-28/+34
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vmdk.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-60/+63
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vhdx.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-162-52/+48
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vdi.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-38/+35
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ssh.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-17/+15
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* sheepdog.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-55/+56
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* rbd.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-33/+30
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* raw_bsd.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-12/+15
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* raw-win32.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-19/+19
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* raw-posix.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-32/+27
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qed.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-162-56/+61
| | | | | | | | | | | | | | | | One extra change is to define QED_DEFAULT_CLUSTER_SIZE = 65536 instead of 64 * 1024; because: according to existing create_options, "cluster size" has default value = QED_DEFAULT_CLUSTER_SIZE, after switching to create_opts, this has to be stringized and set to .def_value_str. That is, .def_value_str = stringify(QED_DEFAULT_CLUSTER_SIZE), so the QED_DEFAULT_CLUSTER_SIZE could not be a expression. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qcow2.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-122/+139
| | | | | | Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qcow.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-36/+36
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* nfs.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-9/+3
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* iscsi.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-18/+16
| | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* gluster.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-39/+42
| | | | | | | | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* cow.c: replace QEMUOptionParameter with QemuOptsChunyan Liu2014-06-161-28/+26
| | | | | | | | Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vvfat.c: handle cross_driver's create_options and create_optsChunyan Liu2014-06-161-7/+17
| | | | | | | | | | vvfat shares create options of qcow driver. To avoid vvfat breaking when qcow driver changes from QEMUOptionParameter to QemuOpts, let it able to handle both cases. Signed-off-by: Chunyan Liu <cyliu@suse.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* change block layer to support both QemuOpts and QEMUOptionParamterChunyan Liu2014-06-168-9/+9
| | | | | | | | | | | Change block layer to support both QemuOpts and QEMUOptionParameter. After this patch, it will change backend drivers one by one. At the end, QEMUOptionParameter will be removed and only QemuOpts is kept. Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Chunyan Liu <cyliu@suse.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/nfs: fix potential segfault on early callbackPeter Lieven2014-06-161-1/+3
| | | | | | | | | it will happen in the future that the callback of a libnfs call directly invokes the callback. In this case we end up in a segfault because the NFSRPC is gone when we the BH is scheduled. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block: Drop superfluous conditionals around g_free()Markus Armbruster2014-06-162-9/+4
| | | | | | | Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vdi: remove double conversionPaolo Bonzini2014-06-101-1/+0
| | | | | | | | | This should be a problem when running on big-endian machines. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* sheepdog: reload only header in a case of live snapshotHitoshi Mitake2014-06-061-3/+6
| | | | | | | | | | | | sheepdog driver doesn't need to read data_vdi_id[] when a live snapshot is created. Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Liu Yuan <namei.unix@gmail.com> Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* sheepdog: fix vdi object update after live snapshotHitoshi Mitake2014-06-061-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | sheepdog driver should decide a write request is COW or not based on inode object which is active when the write request is issued. Example of wrong inode update path in the previous driver: 1. drier issues an ordinal write request to an existing object 2. user creates a snapshot of the VDI before the write request is completed 3. the respones for the request is RDONLY, because the VDI is already a snapshot 4. the driver reload an inode object of the new active VDI, then issues a write request again 5. the second write request can be completed 6. driver decide the request is COW or not with the below conditional branch: if (s->inode.data_vdi_id[idx] != s->inode.vdi_id) { 7. the ID of the written object and VID of the new active VDI is different, so the driver updates data_vdi_id[idx] and writes inode object 8. the existing object cannot be seen by the new active VDI, it results object leaking Cc: Kevin Wolf <kwolf@redhat.com> Cc: Stefan Hajnoczi <stefanha@redhat.com> Cc: Liu Yuan <namei.unix@gmail.com> Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* rbd: Fix leaks in rbd_start_aio() error pathKevin Wolf2014-06-061-1/+4
| | | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Reviewed-by: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* raw-posix: drop raw_get_aio_fd() since it is no longer usedStefan Hajnoczi2014-06-041-34/+0
| | | | | | | | virtio-blk data-plane now uses the QEMU block layer for I/O. We do not need raw_get_aio_fd() anymore. It was a layering violation anyway, so let's get rid of it. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* vmdk: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-041-0/+23
| | | | | | | | | | Implement .bdrv_detach/attach_aio_context() interfaces to propagate detach/attach to BDRVVmdkState->extents[].file. The block layer takes care of ->file and ->backing_hd but doesn't know about our extents BlockDriverStates, which is also part of the graph. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* ssh: use BlockDriverState's AioContextStefan Hajnoczi2014-06-041-17/+19
| | | | | | | | | | | | | | | | Drop the assumption that we're using the main AioContext. Use bdrv_get_aio_context() to register fd handlers in the right AioContext for this BlockDriverState. The .bdrv_detach_aio_context() and .bdrv_attach_aio_context() interfaces are not needed since no fd handlers, timers, or BHs stay registered when requests have been drained. For now this doesn't make much difference but will allow ssh to work in IOThread instances in the future. Acked-by: Richard W.M. Jones <rjones@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* sheepdog: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-041-38/+80
| | | | | | | | | | | | | | Drop the assumption that we're using the main AioContext. Convert qemu_aio_set_fd_handler() to aio_set_fd_handler() and qemu_aio_wait() to aio_poll(). The .bdrv_detach/attach_aio_context() interfaces also need to be implemented to move the socket fd handler from the old to the new AioContext. Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Acked-by: Liu Yuan <namei.unix@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* rbd: use BlockDriverState's AioContextStefan Hajnoczi2014-06-041-2/+3
| | | | | | | | | | | | | Drop the assumption that we're using the main AioContext. Convert qemu_bh_new() to aio_bh_new() and qemu_aio_wait() to aio_poll(). The .bdrv_detach_aio_context() and .bdrv_attach_aio_context() interfaces are not needed since no fd handlers, timers, or BHs stay registered when requests have been drained. Cc: Josh Durgin <josh.durgin@inktank.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
* block/raw-win32: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-043-4/+46
| | | | | | | | | | | | Drop the assumption that we're using the main AioContext for raw-win32. Convert the aio-win32 code to support detach/attach and replace qemu_aio_wait() with aio_poll(). The .bdrv_detach/attach_aio_context() interfaces move the aio-win32 event notifier from the old to the new AioContext. Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/raw-win32: create one QEMUWin32AIOState per BDRVRawStateStefan Hajnoczi2014-06-043-13/+25
| | | | | | | | | | | | Each QEMUWin32AIOState event notifier is associated with an AioContext. Since BlockDriverState instances can use different AioContexts we cannot continue to use a global QEMUWin32AIOState. Let each BDRVRawState have its own QEMUWin32AIOState and free it when BDRVRawState is closed. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/linux-aio: fix memory and fd leakStefan Hajnoczi2014-06-043-0/+14
| | | | | | | | | | | Hot unplugging -drive aio=native,file=test.img,format=raw images leaves the Linux AIO event notifier and struct qemu_laio_state allocated. Luckily nothing will use the event notifier after the BlockDriverState has been closed so the handler function is never called. It's still worth fixing this resource leak. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/raw-posix: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-043-2/+59
| | | | | | | | | | | Drop the assumption that we're using the main AioContext for Linux AIO. Convert the Linux AIO event notifier to use aio_set_event_notifier(). The .bdrv_detach/attach_aio_context() interfaces also need to be implemented to move the event notifier handler from the old to the new AioContext. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* quorum: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-041-12/+36
| | | | | | | | | | Implement .bdrv_detach/attach_aio_context() interfaces to propagate detach/attach to BDRVQuorumState->bs[] children. The block layer takes care of ->file and ->backing_hd but doesn't know about our ->bs[] BlockDriverStates, which is also part of the graph. Reviewed-by: BenoƮt Canet <benoit.canet@irqsave.net> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* qed: use BlockDriverState's AioContextStefan Hajnoczi2014-06-042-10/+33
| | | | | | | | | | | Drop the assumption that we're using the main AioContext. Convert qemu_bh_new() to aio_bh_new() and qemu_aio_wait() to aio_poll() so we're using the BlockDriverState's AioContext. Implement .bdrv_detach/attach_aio_context() interfaces to move the QED_F_NEED_CHECK timer from the old AioContext to the new one. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* nfs: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-041-24/+57
| | | | | | | | | | | | | | | Drop the assumption that we're using the main AioContext. The following functions need to be converted: * qemu_bh_new() -> aio_bh_new() * qemu_aio_set_fd_handler() -> aio_set_fd_handler() * qemu_aio_wait() -> aio_poll() The .bdrv_detach/attach_aio_context() interfaces also need to be implemented to move the fd handler from the old to the new AioContext. Cc: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de>
OpenPOWER on IntegriCloud