Statistics
| Branch: | Revision:

root / block / iscsi.c @ 3d1807ac

History | View | Annotate | Download (28.7 kB)

# Date Author Comment
39c9fb95 09/24/2012 04:15 pm Jeff Cody

block: do not parse BDRV_O_CACHE_WB in block drivers

Block drivers should ignore BDRV_O_CACHE_WB in .bdrv_open flags,
and in the bs->open_flags.

This patch removes the code, leaving the behaviour behind as if
BDRV_O_CACHE_WB was set.

Signed-off-by: Jeff Cody <>...

135b9088 08/28/2012 03:50 pm Ronnie Sahlberg

iscsi: Set number of blocks to 0 for blank CDROM devices

The number of blocks of the device is used to compute the device size
in bdrv_getlength()/iscsi_getlength().
For MMC devices, the ReturnedLogicalBlockAddress in the READCAPACITY10
has a special meaning when it is 0....

27cbd828 08/20/2012 04:58 pm Paolo Bonzini

iscsi: move iscsi_schedule_bh and iscsi_readv_writev_bh_cb

Put these functions at the beginning, to avoid forward references
in the next patches.

Signed-off-by: Paolo Bonzini <>

cfb3f506 08/20/2012 04:58 pm Paolo Bonzini

iscsi: simplify iscsi_schedule_bh

It is always used with the same callback, remove the argument. And
its return value is never used, assume allocation succeeds.

Signed-off-by: Paolo Bonzini <>

1bd075f2 08/20/2012 04:58 pm Paolo Bonzini

iscsi: fix races between task completion and abort

This patch fixes two main issues with block/iscsi.c:

1) iscsi_task_mgmt_abort_task_async calls iscsi_scsi_task_cancel which
was also directly called in iscsi_aio_cancel

2) a race between task completion and task abortion could happen cause...

b2090919 08/20/2012 04:50 pm Paolo Bonzini

Revert "iscsi: Fix NULL dereferences / races between task completion and abort"

This reverts commit 64e69e80920d82df3fa679bc41b13770d2f99360. The commit
returned immediately from iscsi_aio_cancel, risking corruption in case the
following happens:

guest                  qemu                 target...
64e69e80 08/15/2012 02:16 pm Stefan Priebe

iscsi: Fix NULL dereferences / races between task completion and abort

Signed-off-by: Stefan Priebe <>
Acked-by: Ronnie Sahlberg <>
Signed-off-by: Kevin Wolf <>

31459f46 08/09/2012 04:04 pm Ronnie Sahlberg

iscsi: Pick default initiator-name based on the name of the VM

This patch updates the iscsi layer to automatically pick a 'unique'
initiator-name based on the name of the vm in case the user has not set
an explicit iqn-name to use.

Create a new function qemu_get_vm_name() that returns the name of the VM,...

b93c94f7 08/08/2012 03:51 pm Paolo Bonzini

iscsi: do not leak initiator_name

The argument of iscsi_create_context is never freed by libiscsi,
which in fact calls strdup on it. Avoid a leak.

Signed-off-by: Paolo Bonzini <>

f2ef4a6d 08/08/2012 03:51 pm Paolo Bonzini

iscsi: reorganize code for parse_initiator_name

Merge the occurrences of the "iqn.2008-11.org.linux-kvm" string
to avoid duplication.

Signed-off-by: Paolo Bonzini <>

23797df3 07/09/2012 08:35 pm Anthony Liguori

Merge remote-tracking branch 'mjt/mjt-iov2' into staging

  • mjt/mjt-iov2:
    rewrite iov_send_recv() and move it to iov.c
    cleanup qemu_co_sendv(), qemu_co_recvv() and friends
    export iov_send_recv() and use it in iov_send() and iov_recv()
    rename qemu_sendv to iov_send, change proto and move declarations to iov.h...
98392453 07/02/2012 11:18 am Ronnie Sahlberg

ISCSI: Add SCSI passthrough via scsi-generic to libiscsi

Update iscsi to allow passthrough of SG_IO scsi commands when the iscsi
device is forced to be scsi-generic.

Implement both bdrv_ioctl() and bdrv_aio_ioctl() in the iscsi backend,
emulate the SG_IO ioctl and pass the SCSI commands across to the...

622695a4 07/02/2012 11:18 am Ronnie Sahlberg

ISCSI: force use of sg for SMC and SSC devices

If the device we open is a SMC or SSC device, then force the use of sg. We
dont have any medium changer or tape emulation so only passthrough via
real sg or scsi-generic via iscsi would work anyway.

Forcing sg also makes qemu skip trying to read from the device to guess...

d5e6b161 06/11/2012 10:12 pm Michael Tokarev

change qemu_iovec_to_buf() to match other to,from_buf functions

It now allows specifying offset within qiov to start from and
amount of bytes to copy. Actual implementation is just a call
to iov_to_buf().

Signed-off-by: Michael Tokarev <>

f4dfa67f 05/28/2012 03:04 pm Ronnie Sahlberg

ISCSI: Switch to using READ16/WRITE16 for I/O to the LUN

This allows using LUNs bigger than 2TB. Keep using READ10 for other
device types such as MMC.

Signed-off-by: Ronnie Sahlberg <>

6bcd1346 05/28/2012 03:04 pm Ronnie Sahlberg

ISCSI: Only call READCAPACITY16 for SBC devices, use READCAPACITY10 for MMC

Signed-off-by: Ronnie Sahlberg <>

c7b4a952 05/28/2012 03:04 pm Paolo Bonzini

ISCSI: change num_blocks to 64-bit

Signed-off-by: Paolo Bonzini <>

dbfff6d7 05/28/2012 03:04 pm Ronnie Sahlberg

ISCSI: get device type at connection time

This is needed to avoid READ CAPACITY for MMC devices.

Signed-off-by: Ronnie Sahlberg <>
Signed-off-by: Paolo Bonzini <>

c9b9f682 05/28/2012 03:04 pm Ronnie Sahlberg

ISCSI: redo how we set up the events

Call qemu_notify_event() after updating events. Otherwise, If we add
an event for -is-writeable but the socket is already writeable there
may be a delay before the event callback is actually triggered.

Those delays would in particular hurt performance during BIOS boot and...

fa6acb0c 05/04/2012 11:39 am Ronnie Sahlberg

ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs

Update the configure test for libiscsi support to detect version 1.3
or later. Version 1.3 of libiscsi provides both READCAPACITY16 as well
as UNMAP commands.

Update the iscsi block layer to use READCAPACITY16 to detect the size of...

bafbd6a1 04/19/2012 05:37 pm Paolo Bonzini

aio: remove process_queue callback and qemu_aio_process_queue

Both unused after the previous patch.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

f9dadc98 02/09/2012 05:17 pm Ronnie Sahlberg

iSCSI: add configuration variables for iSCSI

This patch adds configuration variables for iSCSI to set
initiator-name to use when logging in to the target,
which type of header-digest to negotiate with the target
and username and password for CHAP authentication....

c589b249 10/28/2011 08:25 pm Ronnie Sahlberg

iSCSI block driver

This provides built-in support for iSCSI to QEMU.

This has the advantage that the iSCSI devices need not be made visible to the host, which is useful if you have very many virtual machines and very many iscsi devices.
It also has the benefit that non-root users of QEMU can access iSCSI devices across the network without requiring root privilege on the host....