Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-18 Thread Peter Lieven
Am 15.11.2012 um 16:54 schrieb Paolo Bonzini : > Il 15/11/2012 15:57, ronnie sahlberg ha scritto: >> I dont know if we should switch to use synchronous code here. >> It is much nicer if all code is async. > > bdrv_open is generally synchronous, so I think Peter's patch is ok. would`t it be bett

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-16 Thread Paolo Bonzini
Il 16/11/2012 18:38, Peter Lieven ha scritto: > Am 16.11.2012 11:38, schrieb Kevin Wolf: >> Am 15.11.2012 17:37, schrieb Paolo Bonzini: >>> Il 15/11/2012 17:13, ronnie sahlberg ha scritto: On Thu, Nov 15, 2012 at 7:54 AM, Paolo Bonzini wrote: > Il 15/11/2012 15:57, ronnie sahlberg ha

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-16 Thread Peter Lieven
Am 16.11.2012 11:38, schrieb Kevin Wolf: Am 15.11.2012 17:37, schrieb Paolo Bonzini: Il 15/11/2012 17:13, ronnie sahlberg ha scritto: On Thu, Nov 15, 2012 at 7:54 AM, Paolo Bonzini wrote: Il 15/11/2012 15:57, ronnie sahlberg ha scritto: I dont know if we should switch to use synchronous code

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-16 Thread Kevin Wolf
Am 15.11.2012 17:37, schrieb Paolo Bonzini: > Il 15/11/2012 17:13, ronnie sahlberg ha scritto: >> On Thu, Nov 15, 2012 at 7:54 AM, Paolo Bonzini wrote: >>> Il 15/11/2012 15:57, ronnie sahlberg ha scritto: I dont know if we should switch to use synchronous code here. It is much nicer if a

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-16 Thread Peter Lieven
Am 16.11.2012 08:44, schrieb Paolo Bonzini: Il 15/11/2012 19:28, Peter Lieven ha scritto: I dont know if we should switch to use synchronous code here. It is much nicer if all code is async. bdrv_open is generally synchronous, so I think Peter's patch is ok. if all is sync wouldn't it be best

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread Paolo Bonzini
Il 15/11/2012 19:28, Peter Lieven ha scritto: >>> >> I dont know if we should switch to use synchronous code here. >>> >> It is much nicer if all code is async. >> > >> > bdrv_open is generally synchronous, so I think Peter's patch is ok. > if all is sync wouldn't it be best to have all code in isc

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread Peter Lieven
Paolo Bonzini wrote: > Il 15/11/2012 15:57, ronnie sahlberg ha scritto: >> I dont know if we should switch to use synchronous code here. >> It is much nicer if all code is async. > > bdrv_open is generally synchronous, so I think Peter's patch is ok. if all is sync wouldn't it be best to have all

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread Paolo Bonzini
Il 15/11/2012 17:13, ronnie sahlberg ha scritto: > On Thu, Nov 15, 2012 at 7:54 AM, Paolo Bonzini wrote: >> Il 15/11/2012 15:57, ronnie sahlberg ha scritto: >>> I dont know if we should switch to use synchronous code here. >>> It is much nicer if all code is async. >> >> bdrv_open is generally syn

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread ronnie sahlberg
On Thu, Nov 15, 2012 at 7:54 AM, Paolo Bonzini wrote: > Il 15/11/2012 15:57, ronnie sahlberg ha scritto: >> I dont know if we should switch to use synchronous code here. >> It is much nicer if all code is async. > > bdrv_open is generally synchronous, so I think Peter's patch is ok. I was thinkin

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread Paolo Bonzini
Il 15/11/2012 15:57, ronnie sahlberg ha scritto: > I dont know if we should switch to use synchronous code here. > It is much nicer if all code is async. bdrv_open is generally synchronous, so I think Peter's patch is ok. Paolo > Is it possible to add a timeout instead that would break out if th

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread Peter Lieven
Am 15.11.2012 um 15:57 schrieb ronnie sahlberg : > I dont know if we should switch to use synchronous code here. > It is much nicer if all code is async. Of course, but its just the initial login after which qemu should exit if it fails. > > Is it possible to add a timeout instead that would

Re: [Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread ronnie sahlberg
I dont know if we should switch to use synchronous code here. It is much nicer if all code is async. Is it possible to add a timeout instead that would break out if the connect/login has not completed within a certain amount of time? regards ronnie sahlberg On Thu, Nov 15, 2012 at 6:50 AM, Pete

[Qemu-devel] [PATCH] iscsi: fix deadlock during login

2012-11-15 Thread Peter Lieven
If the connection is interrupted before the first login is successfully completed qemu-kvm is waiting forever in qemu_aio_wait(). This is fixed by performing an sync login to the target. If the connection breaks after the first successful login errors are handled internally by libiscsi. Signed-o