Re: [Qemu-devel] [PATCH] block: Set cdrom device read only flag

2012-08-07 Thread ronnie sahlberg
that the initiator can write/burn to" regards ronnie sahlberg On Tue, Aug 7, 2012 at 6:47 PM, Markus Armbruster wrote: > Kevin Wolf writes: > >> Am 02.08.2012 09:20, schrieb Kevin Shanahan: >>> On Thu, Aug 02, 2012 at 02:49:52PM +0930, Kevin Shanahan wrote: >>>

Re: [Qemu-devel] [PATCH] ISCSI: Pick default initiator-name based on the name of the VM

2012-08-08 Thread ronnie sahlberg
L; > -goto failed; > -} > - > -if (iscsi_url != NULL) { > -iscsi_destroy_url(iscsi_url); > +goto out; > } > > /* Medium changer or tape. We dont have any emulation for this so this > must > @@ -1039,19 +1031,22 @@ static int iscsi_open(BlockDriverState *bs, const > char *filename, int flags) > bs->sg = 1; > } > > -return 0; > +ret = 0; > > -failed: > +out: > if (initiator_name != NULL) { > g_free(initiator_name); > } > if (iscsi_url != NULL) { > iscsi_destroy_url(iscsi_url); > } > -if (iscsi != NULL) { > -iscsi_destroy_context(iscsi); > + > +if (ret) { > +if (iscsi != NULL) { > +iscsi_destroy_context(iscsi); > +} > +memset(iscsilun, 0, sizeof(IscsiLun)); > } > -memset(iscsilun, 0, sizeof(IscsiLun)); > return ret; > } > > > Can you confirm that this is how the initiator name should be passed, so I can > split the above patch and commit it? > That looks good. Thanks! ronnie sahlberg

Re: [Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-09 Thread ronnie sahlberg
On Thu, Aug 9, 2012 at 10:31 PM, Stefan Priebe - Profihost AG wrote: > Am 09.08.2012 14:19, schrieb Paolo Bonzini: > >> Il 09/08/2012 14:08, Stefan Priebe - Profihost AG ha scritto: >>> >>> >>> virtio-scsi: >>> rand 4k: >>>write: io=822448KB, bw=82228KB/s, iops=20557, runt= 10002msec >>>re

Re: [Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-10 Thread ronnie sahlberg
. STGT does support this : http://stgt.sourceforge.net/ This is a userspace software iscsi target that works on most distros of linux. Support for thin-provisioning in STGT is very very recent : commit 9a855ac0026971c2b5c7f7133febfaf9462410dc Author: Ronnie Sahlberg Date: Sun Apr 15 12

Re: [Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-10 Thread ronnie sahlberg
which commands the target supprots and use one of the supported ones instead of a blanket "you say you support thin-provisioning, I take that as confirmation you support SBC UNMAP" regards ronnie sahlberg

Re: [Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-10 Thread ronnie sahlberg
-side feature frees up storage in the back end, in > the context of thin provisioning (a 100-to-one reduction in space for VDI > when using NexentaStor)." > > So i would say nexenta supports it. But i'm using virtio-scsi-pci? I'm > really sorry to ask so many questions.

Re: [Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-10 Thread ronnie sahlberg
On Fri, Aug 10, 2012 at 9:57 PM, Stefan Priebe - Profihost AG wrote: > Am 10.08.2012 13:12, schrieb ronnie sahlberg: > >> You want discard to work? > > Yes > > >> You are using qemu 1.0 ? > > actual qemu-kvm git > > >> So you dont have the qe

Re: [Qemu-devel] virtio-scsi vs. virtio-blk

2012-08-10 Thread ronnie sahlberg
On Fri, Aug 10, 2012 at 10:14 PM, Stefan Priebe - Profihost AG wrote: > Am 10.08.2012 14:04, schrieb ronnie sahlberg: > >> On Fri, Aug 10, 2012 at 9:57 PM, Stefan Priebe - Profihost AG >> wrote: >>> >>> Am 10.08.2012 13:12, schrieb ronnie sahlber

Re: [Qemu-devel] [PATCH] iscsi: fix race between task completition and task abortion

2012-08-14 Thread ronnie sahlberg
Stefan H How should I do Acked-by properly, Is a reply with the text Acked-by: Ronnie Sahlberg sufficient ? regards ronnie sahlberg On Tue, Aug 14, 2012 at 8:35 PM, Stefan Hajnoczi wrote: > On Tue, Aug 14, 2012 at 08:44:46AM +0200, Stefan Priebe wrote: >> From: spriebe > &g

Re: [Qemu-devel] [PATCH] PATCH V2: fix NULL dereferences / races between task completition and abort

2012-08-15 Thread ronnie sahlberg
Acked-by: Ronnie Sahlberg On Wed, Aug 15, 2012 at 5:09 PM, Stefan Priebe wrote: > Signed-off-by: Stefan Priebe > > --- > block/iscsi.c | 55 +++ > 1 files changed, 23 insertions(+), 32 deletions(-) > > diff --git a/

[Qemu-devel] [PATCH] Two trivial patches for iSCSI and blank DVDs

2012-08-16 Thread Ronnie Sahlberg
-ignsize -overburn dev=/dev/sg1 .iso works from a qemu guest to burn an iSCSI cdrom with these patches. regards ronnie sahlberg

[Qemu-devel] [PATCH 1/2] ISCSI: Set number of blocks to 0 for blank CDROM devices

2012-08-16 Thread Ronnie Sahlberg
device has 1 readable block, but instead it means that the disc is blank and there are no readable blocks. This change ensures that when the iSCSI LUN is loaded with a blank DVD-R disk or similar that bdrv_getlength() will return the correct size of the device as 0 bytes. Signed-off-by: Ronnie

[Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-16 Thread Ronnie Sahlberg
: Ronnie Sahlberg --- block/iscsi.c | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index fb420ea..ca53afa 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1017,10 +1017,19 @@ static int iscsi_open(BlockDriverState *bs, const char

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 7:58 AM, Paolo Bonzini wrote: > Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: >> There is no bdrv_* API for the commands for burning a blank MMC disk >> so when iSCSI LUNs are specified and the LUN is a MMC device with >> 0 available blocks. Th

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
l post 1.2 regards ronnie sahlberg On Sun, Aug 19, 2012 at 8:02 AM, ronnie sahlberg wrote: > On Sun, Aug 19, 2012 at 7:58 AM, Paolo Bonzini wrote: >> Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: >>> There is no bdrv_* API for the commands for burning a blank MMC disk >>

Re: [Qemu-devel] [PATCH 1/2] ISCSI: Set number of blocks to 0 for blank CDROM devices

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 7:57 AM, Paolo Bonzini wrote: > Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: >> The number of blocks of the device is used to compute the device size >> in bdrv_getlength()/iscsi_getlength(). >> For MMC devices, the ReturnedLogicalBlockAddress

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 8:16 AM, Paolo Bonzini wrote: > Il 19/08/2012 00:02, ronnie sahlberg ha scritto: >> Neither of them work, basically because in >> block.c:find_image_format() >> >> if bs->sg is not set in >> >> if (bs->sg || !bdrv_is_inserted

Re: [Qemu-devel] [PATCH 2/2] ISCSI: Force scsi-generic for MMC with blank disks

2012-08-18 Thread ronnie sahlberg
On Sun, Aug 19, 2012 at 8:20 AM, Paolo Bonzini wrote: > Il 19/08/2012 00:02, ronnie sahlberg ha scritto: >> On Sun, Aug 19, 2012 at 7:58 AM, Paolo Bonzini wrote: >>> Il 17/08/2012 04:36, Ronnie Sahlberg ha scritto: >>>> There is no bdrv_* API for the commands for bu

Re: [Qemu-devel] [PATCH RFT 0/3] iscsi: fix NULL dereferences / races between task completion and abort

2012-08-20 Thread ronnie sahlberg
On Mon, Aug 20, 2012 at 6:12 PM, Stefan Priebe - Profihost AG wrote: > Hi Ronnie, > > Am 20.08.2012 10:08, schrieb Paolo Bonzini: > >> That's because the "big QEMU lock" is held by the thread that called >> qemu_aio_cancel. >> >>> and i also see >>> no cancellation message in kernel log. >> >> >>

[Qemu-devel] [PATCH] iSCSI: Add support for SG_IO to bdrv_ioctl()/iscsi_ioctl()

2012-08-20 Thread Ronnie Sahlberg
adding support for SG_IO to iscsi_ioctl() this makes scsi-block and scsi-disk work too. Since scsi-block/scsi-disk never worked with iscsi, and only scsi-generic worked, this is not a new regression. So whether this should go in now or wait until post 1.2 is for your disgression. regards ronnie

[Qemu-devel] [PATCH] iSCSI: Add support for SG_IO in bdrv_ioctl()

2012-08-20 Thread Ronnie Sahlberg
We need to support SG_IO in the synchronous bdrv_ioctl() since this is used by scsi-block Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 109 - 1 files changed, 108 insertions(+), 1 deletions(-) diff --git a/block/iscsi.c b/block

Re: [Qemu-devel] [PATCH v2 1/3] net: asynchronous send/receive infrastructure for net/socket.c

2012-08-21 Thread ronnie sahlberg
In net_socket_update_fd_handler() shouldnt you call qemu_notify_event() if any of the handlers have changed from NULL to non-NULL ? or else it might take a while before the change takes effect. regards ronnie sahlberg On Wed, Aug 22, 2012 at 1:52 AM, Stefan Hajnoczi wrote: > The net/socke

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-24 Thread ronnie sahlberg
On Tue, Jan 24, 2012 at 5:07 AM, Eric Blake wrote: > > Can -readconfig support reading from an inherited fd, rather than only > taking a file name that qemu has to open()? > ... > > Can you give an actual command line that uses -readconfig, as part of > your example? > Thanks for the review Eric.

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-25 Thread ronnie sahlberg
Fair enough. I will send a separate tiny patch to add 'fd:' support to specify to qemu to -readconfig from a preexisting filedescriptor. Other protocols like 'exec:' can easily be added later as needed. regards ronnie sahlberg On Thu, Jan 26, 2012 at 2:57 AM, Eric Blak

[Qemu-devel] [PATCH 0/0] Allow -readconfig to read from a pre-existing filedescriptor

2012-01-25 Thread Ronnie Sahlberg
g possibly sensitive such, into qemu without this data hitting the filesystem or a disk. regards ronnie sahlberg

[Qemu-devel] [PATCH] READCONFIG: Allow reading the configuration from a pre-existing filedescriptor

2012-01-25 Thread Ronnie Sahlberg
Update the readconfig filename parsing to allow specifying an existing, inherited, filedescriptor as 'fd:' This is useful when you want to pass potentially sensitive onfiguration data to qemu without having it hit the filesystem/stable-storage Signed-off-by: Ronnie Sahlberg --- qem

[Qemu-devel] [PATCH 0/0] Add configuration variables for iSCSI

2012-01-25 Thread Ronnie Sahlberg
first try to use a configuration section that matches the target name. If no such block is found, it will fall-back to try the default [iscsi] section instead. regards ronnie sahlberg

[Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-25 Thread Ronnie Sahlberg
ned-off-by: Ronnie Sahlberg --- block/iscsi.c | 139 +++ qemu-config.c | 27 +++ qemu-doc.texi | 54 +- qemu-options.hx | 16 +-- vl.c|8 +++ 5 files changed, 229 insertions(+), 15 deletion

Re: [Qemu-devel] [PATCH v2 11/33] scsi-disk: support DVD profile in GET CONFIGURATION

2012-01-26 Thread ronnie sahlberg
h writeable/burnable media for about 6 months and no one noticed, so maybe not too many people use such features :-( regards ronnie sahlberg On Thu, Jan 26, 2012 at 7:09 PM, Paolo Bonzini wrote: > On 01/25/2012 09:13 PM, Artyom Tarasenko wrote: >> >> On 1/25/12, Paolo Bonzini  

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread ronnie sahlberg
oc/self/fd/" as a prefix for normal files is very small. Small enough it will be justifiable to say "do that and you are on your own". ? regards ronnie sahlberg On Thu, Jan 26, 2012 at 8:08 PM, Kevin Wolf wrote: > Am 25.01.2012 16:57, schrieb Eric Blake: >> On 01/24/201

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-26 Thread ronnie sahlberg
Ok so what about this You use a filename starting with "/proc/self/fd/" and you dont have a proc filesystem mounted? you are on your own! regards ronnie sahlberg On Thu, Jan 26, 2012 at 8:27 PM, Kevin Wolf wrote: > Am 26.01.2012 10:18, schrieb ronnie sahlberg: >> Kevin

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread ronnie sahlberg
already preexisting luns. In that case I think requiring a .bdrv_create feels wrong. We are not creating a new LUN here but just opening an already existing LUN. What about changing bdrv_create() so that IF there is no .bdrv_create method, then assume it might be a pre-existing file in which case we fallback to use .bdrv_open instead. regards ronnie sahlberg

Re: [Qemu-devel] qemu-img convert with block driver without .bdrv_create (like iscsi)

2012-10-25 Thread ronnie sahlberg
On Thu, Oct 25, 2012 at 6:58 AM, Paolo Bonzini wrote: > Il 25/10/2012 15:41, ronnie sahlberg ha scritto: >> On Thu, Oct 25, 2012 at 1:02 AM, Kevin Wolf wrote: >>> Am 25.10.2012 09:52, schrieb Paolo Bonzini: >>>> Il 25/10/2012 09:46, Kevin Wolf ha scritto: >>

Re: [Qemu-devel] Ubuntu/Debian Installer + Virtio-SCSI -> Bad ram pointer

2012-10-30 Thread ronnie sahlberg
be this is something similar ? I.e. does the guest send an "unusual" scsi opcode just before the crash ? regards ronnie sahlberg On Tue, Oct 30, 2012 at 12:37 PM, Peter Lieven wrote: > Am 30.10.2012 19:27, schrieb Stefan Hajnoczi: > >> On Tue, Oct 30, 2012 at 4:56 PM,

Re: [Qemu-devel] QEMU question: is eventfd not thread safe?

2012-07-01 Thread ronnie sahlberg
set-event-handlers functions to automatically call qemu_notify_event() when the descriptos change? To eliminate the need to call this function at all ? regards ronnie sahlberg On Mon, Jul 2, 2012 at 10:06 AM, Alexey Kardashevskiy wrote: > On 02/07/12 09:07, Benjamin Herrenschmidt wr

[Qemu-devel] [PATCH] SCSI rd/wr/vr protect != 0 is an error

2012-07-11 Thread Ronnie Sahlberg
/INVALID_FIELD_IN_CDB regards ronnie sahlberg

[Qemu-devel] [PATCH] SCSI: rd/wr/vr-protect !=0 is an error

2012-07-11 Thread Ronnie Sahlberg
ver should terminate the command with CHECK CONDITION status with the sense key set to ILLEGAL REQUEST and the additional sense code set to INVALID FIELD IN CDB. Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/s

[Qemu-devel] [PATCH] SCSI improved LBA-out-of-range checks

2012-07-11 Thread Ronnie Sahlberg
Paolo, List Please find a small patch to the scsi emulation. This patch improves the checkign that the requested lbas are all available. We check both that lba+len is not going past the end of the device but also iflba+len < lba This second condition could occur for deviously crafted scsi pa

[Qemu-devel] [PATCH] SCSI: improve the lba-out-of-range tests for read/write/verify

2012-07-11 Thread Ronnie Sahlberg
e do not wrap. For example if an opcode would specify the LBA:0x and LEN:2 then lba+len would wrap to 1. The second part of the test is to verify that ALL requested blocks are available, not just the first one. Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c |6 --

[Qemu-devel] [PATCH] SCSI improved LBA-out-of-range checks BUGFIX

2012-07-12 Thread Ronnie Sahlberg
Paolo, Sorry but the previous patch was bad. Use this patch instead it uses the correct check of if (r->req.cmd.lba > r->req.cmd.lba + len || r->req.cmd.lba + len > s->qdev.max_lba + 1) {

[Qemu-devel] [PATCH] SCSI Improved checking for LBA out of range

2012-07-12 Thread Ronnie Sahlberg
e do not wrap. For example if an opcode would specify the LBA:0x and LEN:2 then lba+len would wrap to 1. The second part of the test is to verify that ALL requested blocks are available, not just the first one. Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c |6 --

Re: [Qemu-devel] [PATCH] SCSI: improve the lba-out-of-range tests for read/write/verify

2012-07-12 Thread ronnie sahlberg
Sorry, there is a bug in it. Can you change it to : || r->req.cmd.lba + len > s->qdev.max_lba + 1) { or else the last lba of the device will be flagged as out of range. On Thu, Jul 12, 2012 at 5:04 PM, Paolo Bonzini wrote: > Il 12/07/2012 08:52, Ronnie Sahlber

Re: [Qemu-devel] [RFC V4 00/30] QCOW2 deduplication

2013-01-02 Thread ronnie sahlberg
Do you really need to resolve the conflicts? It might be easier and sufficient to just flag those hashes where a conflict has been detected as : "dont dedup this hash anymore, collissions have been seen." On Wed, Jan 2, 2013 at 10:40 AM, Benoît Canet wrote: > Le Wednesday 02 Jan 2013 à 12:26:37

Re: [Qemu-devel] [RFC V4 00/30] QCOW2 deduplication

2013-01-02 Thread ronnie sahlberg
On Wed, Jan 2, 2013 at 11:18 AM, Troy Benjegerdes wrote: > If you do get a hash collision, it's a rather exceptional event, so I'd > say every effort should be made to log the event and the data that created > it in multiple places. > > There are three questions I'd ask on a hash collision: > > 1)

[Qemu-devel] [PATCH] iSCSI: remove the now obsolete call to qemu_notify_event()

2012-08-30 Thread Ronnie Sahlberg
Paolo, List Please find a trivial patch to iscsi that removes the call to qemu_notify_event() We do not need to call this any more since a recent patch that made qemu_aio_set_fd_handler() and friends invoke this call automatically when required. regards ronnie sahlberg

[Qemu-devel] [PATCH] iSCSI: We dont need to explicitely call qemu_notify_event() any more

2012-08-30 Thread Ronnie Sahlberg
We no longer need to explicitely call qemu_notify_event() any more since this is now done automatically any time the filehandles we listen to change. Signed-off-by: Ronnie Sahlberg --- block/iscsi.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/block/iscsi.c b

[Qemu-devel] [PATCH] iSCSI: Add support for SG_IO to iscsi_ioctl()

2012-08-30 Thread Ronnie Sahlberg
Paolo, List Please find a small patch that adds support for SG_IO to the synchronous iscsi_ioctl() function. This is needed to make scsi-block work with iscsi. regards ronnie sahlberg

[Qemu-devel] [PATCH] iSCSI: We need to support SG_IO also from iscsi_ioctl()

2012-08-30 Thread Ronnie Sahlberg
We need to support SG_IO from the synchronous iscsi_ioctl() since scsi-block uses this to do an INQ to the device to discover its properties This patch makes scsi-block work with iscsi. Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 20 +++- 1 files changed, 19 insertions

Re: [Qemu-devel] [PATCH v6 2/2] block: Support GlusterFS as a QEMU block backend

2012-09-06 Thread ronnie sahlberg
ll gross. URIs already have a well defined way to provide > multiple parameters, dealing with escaping of special characters. ie query > parameters. The whole benefit of using URI syntax is to let apps process > the URIs using standard APIs. We should not be trying to define some extra > magic encoding to let us stuff 2 separate parameters into the path > component > since that means apps have to now write custom parsing code again. Either > the UNIX socket path, or the volume path should be in the URI path, not > both. The other part should be a URI parameter. I'd really expect us to > use: > > gluster:///volname/image?transport=unix&sockpath=/path/to/unix/sock > > +1 ronnie sahlberg

Re: [Qemu-devel] [PATCH] iSCSI: We dont need to explicitely call qemu_notify_event() any more

2012-09-07 Thread ronnie sahlberg
Ping? On Thu, Aug 30, 2012 at 4:56 PM, Ronnie Sahlberg wrote: > We no longer need to explicitely call qemu_notify_event() any more since this > is now done automatically any time the filehandles we listen to change. > > Signed-off-by: Ronnie Sahlberg > --- > block/iscsi.c

Re: [Qemu-devel] [PATCH] iSCSI: We need to support SG_IO also from iscsi_ioctl()

2012-09-07 Thread ronnie sahlberg
ping? On Thu, Aug 30, 2012 at 5:28 PM, Ronnie Sahlberg wrote: > We need to support SG_IO from the synchronous iscsi_ioctl() since > scsi-block uses this to do an INQ to the device to discover its properties > This patch makes scsi-block work with iscsi. > > Signed-off-by:

[Qemu-devel] [PATCH] SCSI disk, set HISUP bit in INQ data

2012-09-14 Thread Ronnie Sahlberg
Paolo, List Please find a trivial patch that make SCSI-DISK set the HISUP bit in the INQ data. Since I think all LUN numbers are reported as SAM4 describes, we should set this bit. Its already sed in SCSI-BUS regards ronnie sahlberg

[Qemu-devel] [PATCH] SCSI: Standard INQUIRY data should report HiSup flag as set.

2012-09-14 Thread Ronnie Sahlberg
the scope of this standard. Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 1585683..52bc062 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -678,7 +678,7 @@ static

Re: [Qemu-devel] [RFC] find_next_bit optimizations

2013-03-11 Thread ronnie sahlberg
Even more efficient might be to do bitwise instead of logical or >if (tmp | d1 | d2 | d3) { that should remove 3 of the 4 conditional jumps and should become 3 bitwise ors and one conditional jump On Mon, Mar 11, 2013 at 8:58 AM, Paolo Bonzini wrote: > Il 11/03/2013 16:37, Peter Lieven

Re: [Qemu-devel] [PULL 00/14] SCSI changes for 2014-06-18

2014-06-18 Thread ronnie sahlberg
On Wed, Jun 18, 2014 at 8:57 AM, Paolo Bonzini wrote: > Il 18/06/2014 17:53, Peter Maydell ha scritto: > >> Then you probably need to fix the configure test ;-) This is >> Ubuntu Trusty so really pretty recent (it's my main x86 build >> machine, not some oddball platform); libiscsi-dev 1.4.0-3. >

Re: [Qemu-devel] [PATCH 08/22] iscsi: implement .bdrv_detach/attach_aio_context()

2014-05-08 Thread ronnie sahlberg
On Thu, May 8, 2014 at 4:33 AM, Stefan Hajnoczi wrote: > On Wed, May 07, 2014 at 04:09:27PM +0200, Peter Lieven wrote: >> On 07.05.2014 12:29, Paolo Bonzini wrote: >> >Il 07/05/2014 12:07, Stefan Hajnoczi ha scritto: >> >>On Fri, May 02, 2014 at 12:39:06AM +0200, Peter Lieven wrote: >> +static

Re: [Qemu-devel] [PATCH 08/20] nfs: Handle failure for potentially large allocations

2014-05-22 Thread ronnie sahlberg
For this case and for the iscsi case, isn't it likely that once this happens the guest is pretty much doomed since I/O to the disk will no longer work ? Should we also change the block layer so that IF *_readv/_writev fails with -ENOMEM then it should try again but break the request up into a chai

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-02 Thread ronnie sahlberg
etically there could be targets that support really huge MaxBurstLengths > 32MB. For those you probably want to switch to WRITE16 when the SCSI transfer length goes > 0x. - if (iscsilun->use_16_for_rw) { + if (iscsilun->use_16_for_rw || num_sectors > 0x) { regards ronnie sa

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread ronnie sahlberg
On Wed, Sep 3, 2014 at 1:09 AM, Peter Lieven wrote: > > >> Am 02.09.2014 um 21:30 schrieb Peter Lieven : >> >> Looking at the code, is it possible that not the guest is causing trouble >> here, but >> multiwrite_merge code? >> >> From what I see the only limit it has when merging requests is the

Re: [Qemu-devel] [PATCH] block/iscsi: use 16 byte CDBs only when necessary

2014-09-03 Thread ronnie sahlberg
On Wed, Sep 3, 2014 at 7:18 AM, Paolo Bonzini wrote: > Il 03/09/2014 16:17, ronnie sahlberg ha scritto: >> I think (a) would be best. >> But I would suggest some small modifications: >> >> Set the default max to something even smaller, like 256 sectors. This >&g

Re: [Qemu-devel] [PATCH 0/4] introduce max_transfer_length

2014-09-05 Thread ronnie sahlberg
Looks good to me. (minor question is just why not let default max be 0x for both 10 and 16 CDBs ?) On Fri, Sep 5, 2014 at 9:51 AM, Peter Lieven wrote: > This series adds the basics for introducing a maximum transfer length > to the block layer. Its main purpose is currently avoiding that > a

Re: [Qemu-devel] [PATCH 0/4] introduce max_transfer_length

2014-09-05 Thread ronnie sahlberg
Feel free to add a Reviewed-by: Ronnie Sahlberg to the patches. On Fri, Sep 5, 2014 at 12:52 PM, Peter Lieven wrote: > Am 05.09.2014 um 19:05 schrieb ronnie sahlberg: >> Looks good to me. >> >> (minor question is just why not let default max be 0x for both 10 >>

Re: [Qemu-devel] [PATCH 2/4] block: immediately cancel oversized read/write requests

2014-09-08 Thread ronnie sahlberg
On Mon, Sep 8, 2014 at 7:42 AM, Paolo Bonzini wrote: > Il 08/09/2014 16:35, Peter Lieven ha scritto: > > messages. :) So you would not throw an error msg here? >>> No, though a trace could be useful. >> >> Is there a howto somewhere how to implement that? > > Try commit 4ac4458076e1aa

Re: [Qemu-devel] [RFC] How to handle feature regressions in new QEMU releases

2014-07-16 Thread ronnie sahlberg
On Wed, Jul 16, 2014 at 10:11 AM, Stefan Weil wrote: > Am 16.07.2014 18:49, schrieb Paolo Bonzini: >> Il 16/07/2014 18:28, Stefan Weil ha scritto: >>> Debian testing includes a brand new libiscsi, but it >>> does not include libiscsi.pc, so pkg-config won't know that it is >>> available and config

Re: [Qemu-devel] [RFC] How to handle feature regressions in new QEMU releases

2014-07-23 Thread ronnie sahlberg
On Wed, Jul 16, 2014 at 10:29 AM, Michael Tokarev wrote: > 16.07.2014 21:23, ronnie sahlberg wrote: > >> If you ask debian to upgrade. Could you ask them to wait and upgrade after I >> have release the next version, hopefully if all goes well, at the end >> of this week? &

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-22 Thread ronnie sahlberg
file for users that run qemu directly from the command line and are not using -S. comments ? regards ronnie sahlberg On Mon, Dec 19, 2011 at 12:48 AM, Paolo Bonzini wrote: > On 12/18/2011 05:48 AM, Ronnie Sahlberg wrote: >> >> This patch adds configuration variables for iSCSI t

Re: [Qemu-devel] OEM Windows in Qemu

2011-12-22 Thread ronnie sahlberg
Why not just buy a non-OEM version ? They are surely not tied to a specific piece of hardware and its licence should allow to run on "arbitrary PC HW you happen to want to install/run it on once activated" On Fri, Dec 23, 2011 at 5:11 PM, wrote: > > >>"My patch" does not produce any SLIC at a

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2011-12-23 Thread ronnie sahlberg
/* stage one, called before -S monitor is invoked */ .open_stage_2() /* called after -S finishes and when it starts to boot the guest CPU */ ? regards ronnie sahlberg On Fri, Dec 23, 2011 at 8:08 PM, Paolo Bonzini wrote: > On 12/22/2011 09:51 PM, ronnie sahlberg wrote: >> >&g

Re: [Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-20 Thread ronnie sahlberg
On Thu, Jan 19, 2012 at 11:17 PM, Kevin Wolf wrote: > Am 18.12.2011 05:48, schrieb Ronnie Sahlberg: >> 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 targe

[Qemu-devel] [PATCH] Add configuration variables for iscsi

2012-01-21 Thread Ronnie Sahlberg
n instead. regards ronnie sahlberg

[Qemu-devel] [PATCH] iSCSI: add configuration variables for iSCSI

2012-01-21 Thread Ronnie Sahlberg
different targets, you can also configure this on a per target basis by using a group name: [iscsi "iqn.target.name"] ... Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 139 +++ qemu-config.c | 27 +++ qem

Re: [Qemu-devel] [PATCH] readconfig: add emulation of /dev/fd/ to platforms that that lacks this API

2012-03-20 Thread ronnie sahlberg
None. No platforms that I care about. On Tue, Mar 20, 2012 at 3:43 AM, Anthony Liguori wrote: > On 03/03/2012 01:49 AM, Ronnie Sahlberg wrote: >> >> Please find a patch to -readconfig. >> >> On many platforms -readconfig /dev/fd/  can be used to read from an >

[Qemu-devel] (no subject)

2011-06-11 Thread Ronnie Sahlberg
Please find attached a patch to add built-in support for iSCSI into QEMU. Please review and/or apply this patch. This is the latest version of this patch and I think I have addressed all previous concerns and suggestions. Using built-in iSCSI support has many advantages for certain use cases :

[Qemu-devel] [PATCH] iSCSI block driver support

2011-06-11 Thread Ronnie Sahlberg
LIBISCSI_CHAP_PASSWORD="password" to avoid it showing up in the process list Example: ./x86_64-softmmu/qemu-system-x86_64 -m 1024 -cdrom iscsi://127.0.0.1/iqn.ronnie.test/2 --drive file=iscsi://127.0.0.1/iqn.ronnie.test/1 -boot d -enable-kvm Signed-off-by: Ronnie Sahlberg --- Makefile.o

[Qemu-devel] iSCSI support for QEMU

2011-06-11 Thread ronnie sahlberg
Sorry about the missing subject line in the previous mail Got confused when using git-send-patch :-) regards ronnie sahlberg On Sun, Jun 12, 2011 at 12:47 PM, Ronnie Sahlberg wrote: > Please find attached a patch to add built-in support for iSCSI into QEMU. > Please review and/or appl

[Qemu-devel] [PATCH 0/4] ISCSI: Passthough updates

2012-05-25 Thread Ronnie Sahlberg
Paolo, list Please find a set of patches for iscsi. 1, The recent change to the eventsystem in iscsi is racy. If the async connect of the socket takes longer than almost instant, the shortcircuit trying to write directly to the socket may try to do so before the socket is established. So we hc

[Qemu-devel] [PATCH 1/4] ISCSI: Only call READCAPACITY16 for SBC devices

2012-05-25 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index df0b6c8..39d75cb 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -727,13 +727,20 @@ iscsi_inquiry_cb(struct

[Qemu-devel] [PATCH 2/4] ISCSI: Use READCAPACITY10 for MMC devices

2012-05-25 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 47 +++ 1 files changed, 47 insertions(+), 0 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 39d75cb..2ddb9e5 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -700,6 +700,42

[Qemu-devel] [PATCH 3/4] ISCSI: Only use READ16 for SBC devices. Use READ10 for other device types such as MMC

2012-05-25 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 21 - 1 files changed, 16 insertions(+), 5 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 2ddb9e5..a015a52 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -379,14 +379,25 @@ iscsi_aio_readv

[Qemu-devel] [PATCH 4/4] ISCSI: If the device we open is a SMC device, then force the use of sg. We dont have any medium changer emulation so only passthrough via real sg or scsi-generic via iscsi wou

2012-05-25 Thread Ronnie Sahlberg
passthrough mode. Signed-off-by: Ronnie Sahlberg --- block/iscsi.c |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index a015a52..9ce38b5 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1032,6 +1032,15 @@ static int iscsi_open

Re: [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3

2012-05-25 Thread ronnie sahlberg
Paolo, You need this patch too since without it it might crash. commit 6e46eb1846a862dad253be1a576f8554071b154a Author: Ronnie Sahlberg Date: Sat May 26 10:28:05 2012 +1000 ISCSI: We can only do the shortcircuit and write directly to the socket IFF we know the socket is open (and

Re: [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3

2012-05-26 Thread ronnie sahlberg
an revert 5b5e96bba6835b794ba237c1ddd6580dea8d4aef and use the patch I attach instead regards ronnie sahlberg 2012 at 5:46 PM, Paolo Bonzini wrote: > Il 26/05/2012 07:41, ronnie sahlberg ha scritto: >> Paolo, >> >> You need this patch too since without i

Re: [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3

2012-05-26 Thread ronnie sahlberg
Im compiling your branch now and will verify all is good. It is missing an include so you need to add this patch to compile : On Sat, May 26, 2012 at 5:59 PM, ronnie sahlberg wrote: > Almost, > but connecter=1 should be set after the if statement not inside it. > >     if

Re: [Qemu-devel] [PULL 1.1 0/2] SCSI patches for 1.1.0-rc3

2012-05-26 Thread ronnie sahlberg
I have compiled your branch and run through some tests. It all looks good as long as you apply the patch to #include "hw/scsi-defs.h" On Sat, May 26, 2012 at 6:17 PM, ronnie sahlberg wrote: > Im compiling your branch now and will verify all is good. > > It is missing an i

Re: [Qemu-devel] [PATCH 4/4] ISCSI: If the device we open is a SMC device, then force the use of sg. We dont have any medium changer emulation so only passthrough via real sg or scsi-generic via iscsi

2012-05-28 Thread ronnie sahlberg
ixed. regards ronnie sahlberg On Mon, May 28, 2012 at 4:48 PM, Paolo Bonzini wrote: > Il 27/05/2012 15:12, Andreas Färber ha scritto: >>> > Modified to also do the same for tapes, applied to scsi-next branch for >>> > 1.2. >> Paolo, it seems you haven'

Re: [Qemu-devel] Block job commands in QEMU 1.2 [v2, including support for replication]

2012-05-31 Thread ronnie sahlberg
file level support APIs for a cheap way to cumpute the block deltas. I would imagine all midrange or better block storage devices that support LUN snapshotting provide this too. So why do snapshotting and computation of snapshot deltas in qemu ? Why not just externalize it with "you want snapshotting and incremental replication => you must use a system where file/block supports it". regards ronnie sahlberg

[Qemu-devel] [PATCH 0/2] Two trivial patches for SCSI thin provisioning

2012-04-19 Thread Ronnie Sahlberg
LUN is thin-provisionied. regards ronnie sahlberg

[Qemu-devel] [PATCH 2/2] SCSI emulation: should tell the guest that we actually support thin provisioning

2012-04-19 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index ccd9291..d6c197f 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -532,7 +532,7 @@ static int scsi_disk_emulate_inquiry(SCSIRequest

[Qemu-devel] [PATCH 1/2] SCSI emulation: Support unmap via WRITE_SAME_10. It is the same as WRITE_SAME_16 as far as QEMU is concerned

2012-04-19 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- hw/scsi-disk.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 9949786..ccd9291 100644 --- a/hw/scsi-disk.c +++ b/hw/scsi-disk.c @@ -531,7 +531,7 @@ static int scsi_disk_emulate_inquiry

Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-20 Thread ronnie sahlberg
that a SCSI target for virtual machines is so complex that > it can't possibly be implemented properly in the kernel is a bunch of > non-sense. There are also other benefits to NOT implement scsi emulation in the kernel, aside from the security aspect of running large amounts of code inside kernel context vs within restricted userspace context. I am very happy to be able to add emulation of new opcodes or new features to tgtd WITHOUT having to recompile my kernel. regards ronnie sahlberg

Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-23 Thread ronnie sahlberg
ages similar to loopback devices (mount -o loop).  Do you think > putting the userspace interface into the SCSI target has advantages > over the block driver or device-mapper level? > Hi Stefan, A little bit off-topic but When you design the proper place and API to plug virt-scsi into an external SCSI parser outside of qemu like the target in the kernel ... It would be very nice if one could also plug virt-scsi into libiscsi and pass the CDBs straight to the remote iSCSI target too. Keep some thoughts on virt-scsi + libiscsi integration. regards ronnie sahlberg

[Qemu-devel] [PATCH 0/1] Add support for iSCSI thin-provisioning

2012-04-23 Thread Ronnie Sahlberg
sg_write_same --16 --unmap from within the guest. This was trapped in hw/scsi-disc.c and then appeared on the wire to the iscsi target as a proper SCSI UNMAP command. regards ronnie sahlberg

[Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs

2012-04-23 Thread Ronnie Sahlberg
larger than 2TB. Update to implement bdrv_aio_discard() using the UNMAP command. This allows us to use thin-provisioned LUNs from TGTD and other iSCSI targets that support thin-provisioning. Signed-off-by: Ronnie Sahlberg --- block/iscsi.c | 86

Re: [Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs

2012-04-24 Thread ronnie sahlberg
On Tue, Apr 24, 2012 at 4:46 PM, Paolo Bonzini wrote: > Il 24/04/2012 08:29, Ronnie Sahlberg ha scritto: >> 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 >>

Re: [Qemu-devel] [PATCH] ISCSI: Add support for thin-provisioning via discard/UNMAP and bigger LUNs

2012-04-24 Thread ronnie sahlberg
On Tue, Apr 24, 2012 at 6:05 PM, Paolo Bonzini wrote: > Il 24/04/2012 10:02, ronnie sahlberg ha scritto: >> So ignore this patch for now. I will redo UNMAP in the patch to >> instead use the generic scsi function inside libiscsi. >> >> That will serve the purpose to ve

Re: [Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-24 Thread ronnie sahlberg
On Tue, Apr 24, 2012 at 7:13 PM, Stefan Hajnoczi wrote: > On Tue, Apr 24, 2012 at 8:05 AM, Paolo Bonzini wrote: >> Il 24/04/2012 06:21, ronnie sahlberg ha scritto: >>> Hi Stefan, >>> >>> A little bit off-topic but >>> >>> When you des

Re: [Qemu-devel] Wireshark SCSI dissectors for new transports

2012-02-28 Thread ronnie sahlberg
n, dataout, response/sense) scsi * } if your transport also supports multiple datain/out blobs for a single task, in order to reassemble the data we would also need a offset/length for each datain/out blob. regards ronnie sahlberg On Tue, Feb 28, 2012 at 8:59 PM, Stefan Hajnoczi wrote: > Wi

[Qemu-devel] [PATCH] Rename libiscsi to libiscsiclient

2012-03-02 Thread Ronnie Sahlberg
Please find a patch that changes the name of the iscsi library from libiscsi to libiscsiclient While libiscsi is a very nice name that works on all platforms, including win32, it clashes with a linux library. regards ronnie sahlberg

[Qemu-devel] [PATCH] Change library from libiscsi to libiscsiclient to match library rename in libiscsi

2012-03-02 Thread Ronnie Sahlberg
Signed-off-by: Ronnie Sahlberg --- configure |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index fb0e18e..294c0c1 100755 --- a/configure +++ b/configure @@ -2503,9 +2503,9 @@ if test "$libiscsi" != "no" ; then #inc

Re: [Qemu-devel] QEMU desired libiscsi.so clashes with libiscsi.so from iscsi-initiator-utils

2012-03-02 Thread ronnie sahlberg
/libiscsi/downloads That resolves all issues you are concerned about ? regards ronnie sahlberg On Tue, Feb 14, 2012 at 12:24 AM, Daniel P. Berrange wrote: > I was investigating how to build latest QEMU with the iSCSI block driver > enabled. I saw that configure wanted a libiscsi.so, so I ins

  1   2   3   >