Almost, but connecter=1 should be set after the if statement not inside it.
if (status != 0) { + itask->iscsilun->connected = 1; itask->status = 1; I.e. dont set it in the error path, set it after the block. then it should be all good. optionally you can revert 5b5e96bba6835b794ba237c1ddd6580dea8d4aef and use the patch I attach instead regards ronnie sahlberg 2012 at 5:46 PM, Paolo Bonzini <pbonz...@redhat.com> wrote: > Il 26/05/2012 07:41, ronnie sahlberg ha scritto: >> Paolo, >> >> You need this patch too since without it it might crash. >> >> commit 6e46eb1846a862dad253be1a576f8554071b154a >> Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> >> 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 writeable). >> If the target is more than insignificant distance away, we could >> otherwise >> try to write to the socket before the nonblocking connect has completed >> which would cause a crash. >> >> Signed-off-by: Ronnie Sahlberg <ronniesahlb...@gmail.com> >> >> >> The other patches in the series can wait until later, but this one is >> needed for 1.1 > > I didn't get the patch, so I redid it. > > Can you test asap git://github.com/bonzini/qemu.git, branch > scsi-candidate-1.1 to see if it matches what you want to be in 1.1? > > Paolo
0001-ISCSI-We-can-only-do-the-shortcircuit-and-write-dire.patch
Description: Binary data