summaryrefslogtreecommitdiffstats
path: root/block/iscsi.c
Commit message (Collapse)AuthorAgeFilesLines
* block: Add Error argument to bdrv_refresh_limits()Kevin Wolf2014-07-181-2/+1
| | | | | | Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* 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>
* 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-161-1/+1
| | | | | | | | | 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>
* 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>
* block: Drop superfluous conditionals around g_free()Markus Armbruster2014-06-161-3/+1
| | | | | | | 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>
* iscsi: implement .bdrv_detach/attach_aio_context()Stefan Hajnoczi2014-06-041-24/+56
| | | | | | | | | | | | | | 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 <pl@kamp.de> Cc: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de>
* Merge remote-tracking branch 'remotes/bonzini/scsi-next' into stagingPeter Maydell2014-05-221-3/+1
|\ | | | | | | | | | | | | | | | | | | * remotes/bonzini/scsi-next: megasas: remove buildtime strings block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not defined virtio-scsi: Plug memory leak on virtio_scsi_push_event() error path scsi: Document intentional fall through in scsi_req_length() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * block: iscsi build fix if LIBISCSI_FEATURE_IOVECTOR is not definedJeff Cody2014-05-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit b03c380 introduced the function iscsi_allocationmap_is_allocated(), however it is only used within a code block that is conditionally compiled. This produces a warning (error with -werror) of "defined but not used" for the the function, if LIBISCSI_FEATURE_IOVECTOR is not defined. This wraps iscsi_allocationmap_is_allocated() in the same conditional. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | Merge remote-tracking branch 'remotes/bonzini/scsi-next' into stagingPeter Maydell2014-05-191-107/+212
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/bonzini/scsi-next: [PATCH] block/iscsi: bump year in copyright notice block/iscsi: allow cluster_size of 4K and greater block/iscsi: clarify the meaning of ISCSI_CHECKALLOC_THRES block/iscsi: speed up read for unallocated sectors block/iscsi: allow fall back to WRITE SAME without UNMAP MAINTAINERS: mark megasas as maintained megasas: Add MSI support megasas: Enable MSI-X support megasas: Implement LD_LIST_QUERY scsi: Improve error messages more scsi-disk: Improve error messager if can't get version number Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * [PATCH] block/iscsi: bump year in copyright noticePeter Lieven2014-05-051-1/+1
| | | | | | | | Signed-off-by: Peter Lieven <pl@kamp.de>
| * block/iscsi: allow cluster_size of 4K and greaterPeter Lieven2014-04-291-1/+1
| | | | | | | | | | | | | | | | | | | | depending on the target the opt_unmap_gran might be as low as 4K. As we know use this also as a knob to activate the allocationmap feature lower the barrier. The limit 4K (and not 512) is choosen to avoid a potentially too big allocationmap. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * block/iscsi: clarify the meaning of ISCSI_CHECKALLOC_THRESPeter Lieven2014-04-291-2/+10
| | | | | | | | | | Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * block/iscsi: speed up read for unallocated sectorsPeter Lieven2014-04-291-102/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this patch implements a cache that tracks if a page on the iscsi target is allocated or not. The cache is implemented in a way that it allows for false positives (e.g. pretending a page is allocated, but it isn't), but no false negatives. The cached allocation info is then used to speed up the read process for unallocated sectors by issueing a GET_LBA_STATUS request for all sectors that are not yet known to be allocated. If the read request is confirmed to fall into an unallocated range we directly return zeroes and do not transfer the data over the wire. Tests have shown that a relatively small amount of GET_LBA_STATUS requests happens a vServer boot time to fill the allocation cache (all those blocks are not queried again). Not to transfer all the data of unallocated sectors saves a lot of time, bandwidth and storage I/O load during block jobs or storage migration and it saves a lot of bandwidth as well for any big sequential read of the whole disk (e.g. block copy or speed tests) if a significant number of blocks is unallocated. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| * block/iscsi: allow fall back to WRITE SAME without UNMAPPeter Lieven2014-04-281-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | if the iscsi driver receives a write zeroes request with the BDRV_REQ_MAY_UNMAP flag set it fails with -ENOTSUP if the iscsi target does not support WRITE SAME with UNMAP. However, the BDRV_REQ_MAY_UNMAP is only a hint and writing zeroes with WRITE SAME will still be better than falling back to writing zeroes with WRITE16. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | block/iscsi: bump year in copyright noticePeter Lieven2014-05-091-1/+1
| | | | | | | | | | Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* | iscsi: Don't use error_is_set() to suppress additional errorsMarkus Armbruster2014-04-251-5/+4
|/ | | | | | | | | | | | | | | | | | | Using error_is_set(errp) that way can sweep programming errors under the carpet when we get called incorrectly with an error set. Commit 24d3bd6 added a broken error path to iscsi_do_inquiry(): it first calls error_setg(), then jumps to the preexisting error label, where error_setg() gets called again, triggering an assertion failure. Commit cbee81f fixed this by guarding the second error_setg() with an error_is_set(). Replace this fix by a simpler and safer one: jump right behind the second error_setg(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block: Add errp to bdrv_new()Kevin Wolf2014-04-221-1/+1
| | | | | | | | | | | | | This patch adds an errp parameter to bdrv_new() and updates all its callers. The next patches will make use of this in order to check for duplicate IDs. Most of the callers know that their ID is fine, so they can simply assert that there is no error. Behaviour doesn't change with this patch yet as bdrv_new() doesn't actually assign errors to errp. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
* iscsi: Remember to set ret for iscsi_open in error caseFam Zheng2014-04-111-0/+1
| | | | | Signed-off-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iscsi: Don't set error if already set in iscsi_do_inquiryFam Zheng2014-04-041-2/+4
| | | | | | | | This eliminates the possible assertion failure in error_setg(). Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iscsi: always query max WRITE SAME lengthPaolo Bonzini2014-04-031-5/+7
| | | | | | | | | | | | Max WRITE SAME length is also used when the UNMAP bit is zero, so it should be queried even if LBPWS=0. Same for the optimal transfer length. However, the write_zeroes_alignment only matters for UNMAP=1 so we still restrict it to LBPWS=1. Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* iscsi: ignore flushes on scsi-generic devicesPaolo Bonzini2014-04-031-0/+4
| | | | | | | | Non-block SCSI devices do not support flushing, but we may still send them requests via bdrv_flush_all. Just ignore them. Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* iscsi: recognize "invalid field" ASCQ from WRITE SAME commandPaolo Bonzini2014-04-031-1/+2
| | | | | | | | | Some targets may return "invalid field" as the ASCQ from WRITE SAME if they support the command only without the UNMAP field. Recognize that, and return ENOTSUP just like for "invalid operation code". Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* iscsi: Use bs->sg for everything else than disksKevin Wolf2014-03-051-5/+4
| | | | | | | | | | | | | | | | The current iscsi block driver code makes the rather arbitrary decision that TYPE_MEDIUM_CHANGER and TYPE_TAPE devices have bs->sg = 1 and all other device types are disks. Instead of this, check for TYPE_DISK to expose the disk interface and make everything else bs->sg = 1. In particular, this includes devices with TYPE_STORAGE_ARRAY, which is what LUN 0 of an iscsi target is. (See https://bugzilla.redhat.com/show_bug.cgi?id=1067784 for the exact scenario.) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net> Acked-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: fix segfault if writesame failsPeter Lieven2014-02-221-8/+9
| | | | | | | | | commit fa6252b0 introduced a segfault because it tries to read iTask.task->sense after iTask.task has been freed. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: query for supported VPD pagesPeter Lieven2014-02-221-53/+54
| | | | | | | | | this patch ensures that we only query for block provisioning and block limits vpd pages if they are advertised. It also cleans up the inquiry code and eliminates some redundant code. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: fix deadlock on scsi check conditionPeter Lieven2014-02-221-1/+8
| | | | | | | | | | the retry logic was broken because the complete status of the task structure was not reset. this resulted in an infinite loop retrying the command over and over. CC: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* iscsi: correctly propagate errors in iscsi_openPaolo Bonzini2014-02-211-50/+53
| | | | | | | | | | | | | | | | | Before: $ ./qemu-io-old qemu-io-old> open -r -o file.driver=iscsi,file.filename=foo Failed to parse URL : foo qemu-io-old: can't open device (null): Could not open 'foo': Invalid argument After: $ ./qemu-io qemu-io> open -r -o file.driver=iscsi,file.filename=foo qemu-io: can't open device (null): Failed to parse URL : foo Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* iscsi: fix indentationPaolo Bonzini2014-02-211-22/+23
| | | | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into stagingPeter Maydell2014-02-201-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remotes/qmp-unstable/queue/qmp: monitor: Add object_add class argument completion. monitor: Add object_del id argument completion. monitor: Add device_add device argument completion. monitor: Add device_del id argument completion. qmp: expose list of supported character device backends Use error_is_set() only when necessary QMP: allow JSON dict arguments in qmp-shell hmp: migrate command (without -d) now blocks correctly Conflicts: blockdev.c [PMM: resolved trivial conflict in blockdev.c] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
| * Use error_is_set() only when necessaryMarkus Armbruster2014-02-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | error_is_set(&var) is the same as var != NULL, but it takes whole-program analysis to figure that out. Unnecessarily hard for optimizers, static checkers, and human readers. Dumb it down to obvious. Gets rid of several dozen Coverity false positives. Note that the obvious form is already used in many places. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | block: Add notes to iSCSI's .bdrv_open and .bdrv_reopen_prepareJeff Cody2014-02-141-2/+8
|/ | | | | | | | | | | | | | iSCSI currently does not need to do any actions to support the current usage of bdrv_reopen(). However, it is important to note a couple of things: 1.) A connection will not be re-established to an iSCSI target, and 2.) If iscsi_open() is changed to parse 'flags', then iscsi_reopen_prepare() may need to be more than a stub. In light of the above, this commit adds comments above both of the functions to bring attention to these facts. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/iscsi: always fill bs->bl.opt_transfer_lengthPeter Lieven2014-02-091-3/+2
| | | | | | | | | | | the opt_transfer_length has nothing to do with logical block provisioning stuff so always copy it from the block limits VPD page. Reported-By: Benoit Canet <benoit@irqsave.net> Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Benoit Canet <benoit@irqsave.net> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2014-01-241-0/+8
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi: Support TEST UNIT READY in the dummy LUN0 block: add .bdrv_reopen_prepare() stub for iscsi virtio-scsi: Prevent assertion on missed events virtio-scsi: Cleanup of I/Os that never started scsi: Assign cancel_io vector for scsi_disk_emulate_ops Conflicts: block/iscsi.c aliguori: resolve trivial merge conflict in block/iscsi.c Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * block: add .bdrv_reopen_prepare() stub for iscsiJeff Cody2014-01-151-0/+9
| | | | | | | | | | | | | | | | | | To suppport reopen(), the .bdrv_reopen_prepare() stub must exist. iSCSI does not have anything that needs to be done to support reopen, so we can just implement the _prepare() stub. Signed-off-by: Jeff Cody <jcody@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | iscsi: Set bs->request_alignmentPaolo Bonzini2014-01-241-0/+1
| | | | | | | | | | | | | | | | | | | | The iSCSI backend already gets the block size from the READ CAPACITY command it sends. Save it so that the generic block layer gets it too. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
* | block: Move initialisation of BlockLimits to bdrv_refresh_limits()Kevin Wolf2014-01-241-17/+29
| | | | | | | | | | | | | | | | | | | | This function separates filling the BlockLimits from bdrv_open(), which allows it to call it from other operations which may change the limits (e.g. modifications to the backing file chain or bdrv_reopen) Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net>
* | block/iscsi: return -ENOMEM if an async call fails immediatelyPeter Lieven2014-01-221-6/+6
|/ | | | | | | | | | | if an async libiscsi call fails directly it can only be due to an out of memory condition. All other errors are returned through the callback. Signed-off-by: Peter Lieven <pl@kamp.de> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
* Merge remote branch 'luiz/queue/qmp' into qmpqEdgar E. Iglesias2014-01-141-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * luiz/queue/qmp: migration: qmp_migrate(): keep working after syntax error qerror: Remove assert_no_error() qemu-option: Remove qemu_opts_create_nofail target-i386: Remove assert_no_error usage hw: Remove assert_no_error usages qdev: Delete dead code error: Add error_abort monitor: add object-add (QMP) and object_add (HMP) command monitor: add object-del (QMP) and object_del (HMP) command qom: catch errors in object_property_add_child qom: fix leak for objects created with -object rng: initialize file descriptor to -1 qemu-monitor: HMP cpu-add wrapper vl: add missing transition debug->finish_migrate Message-Id: 1389045795-18706-1-git-send-email-lcapitulino@redhat.com Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
| * qemu-option: Remove qemu_opts_create_nofailPeter Crosthwaite2014-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a boiler-plate _nofail variant of qemu_opts_create. Remove and use error_abort in call sites. null/0 arguments needs to be added for the id and fail_if_exists fields in affected callsites due to argument inconsistency between the normal and no_fail variants. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
* | Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori2014-01-101-1/+10
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * bonzini/scsi-next: scsi-disk: add UNMAP limits to block limits VPD page block/iscsi: use a bh to schedule co reentrance Message-id: 1387720926-11421-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * | block/iscsi: use a bh to schedule co reentrancePeter Lieven2013-12-161-1/+10
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | this fixes a potential segfault and performance regression. If the coroutine is reentered directly in the iscsi_co_generic_cb iscsi_process_{read,write} are interrupted and reentered any time later. One the one hand this could happen after an iscsi_close where the iscsi context is already gone (segfault). On the other hand this limits the number of processed callbacks in each aio_dispatch to one (potential performance regression). Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* | block/iscsi: Fix compilation for libiscsi 1.4.0 (API change)Stefan Weil2013-12-201-1/+4
|/ | | | | | | | | | | | | Function iscsi_read10_task got additional parameters starting with version libiscsi 1.5.0. libiscsi 1.4.0 is still widely used (Debian wheezy, jessie and other Linux distributions currently provide packages for QEMU which use it), so we still need support for this older API. Reviewed-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
* block/iscsi: introduce bdrv_co_{readv, writev, flush_to_disk}Peter Lieven2013-12-091-296/+105
| | | | | | | | | | | this converts read, write and flush functions from aio to coroutines eliminating almost 200 lines of code. The requirement for libiscsi is bumped to version 1.4.0 which was released in may 2012. Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* block/iscsi: set bs->bl.opt_transfer_lengthPeter Lieven2013-12-051-0/+3
| | | | | | Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
OpenPOWER on IntegriCloud