Skip to contentSkip to conversation

block/iscsi: handle BUSY condition

PATCH Peter Lieven 2 participants 3 messages Jun 5, 2014 8 messages not in the archive Kbuild

lore
Share & tools
lore
#8 lore raw
In reply to a message not in the archive
Quoted 15 lines · Paolo Bonzini

Il 30/05/2014 11:04, Peter Lieven ha scritto:

Quoted 14 lines

Am 30.05.2014 07:50, schrieb Paolo Bonzini:

Quoted 13 lines

Il 29/05/2014 22:25, Peter Lieven ha scritto:

Quoted 11 lines

Am 29.05.2014 21:17, schrieb Paolo Bonzini:

Quoted 7 lines

Il 29/05/2014 20:41, Peter Lieven ha scritto:

Quoted 4 lines

static inline unsigned geo_rand_range(double m, double n) {

    return exp((log(m) + (double)rand() /
               (RAND_MAX / (log(n) - log(m) + log(1)) + log(1))));
}

Yes, exactly (except that log(1) is zero, and was only needed in your case because you were using integers).

Regarding aio_timer_new vs. aio_timer_init. Shall we really have the complete QEMU_TIMER struct in each iTask? We need this retry_timer only in the really rare case of a BUSY.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

Ok, makes sense. Though the overall cost of IscsiTasks should be less than 4k per block device with a separate QemuTimer, and 8k if you embed it.

Otherwise the patch looks good, thanks!

Okay, when are you preparing the next pull request?

After the dataplane patches go in. But you can send the patch now, I'll rebase.

It might be that we need a LIBS+= -lm to the Makefile in the root directory. I had strange problems when linking qemu-img/qemu-io/qemu-nbd.

Peter

#9 lore raw

Il 05/06/2014 11:29, Peter Lieven ha scritto:

Quoted 3 lines

It might be that we need a LIBS+= -lm to the Makefile in the root directory. I had strange problems when linking qemu-img/qemu-io/qemu-nbd.

cat > $TMPC << EOF
#include <math.h>
int main(void) { return isnan(sin(0.0)); }
EOF
if compile_prog "" "" ; then
:
elif compile_prog "" "-lm" ; then
LIBS="-lm $LIBS"
libs_qga="-lm $libs_qga"
else
error_exit "libm check failed"
fi

Shouldn't be necessary, should it?

Paolo

#10 lore raw
Quoted 19 lines · Paolo Bonzini

Il 05/06/2014 11:29, Peter Lieven ha scritto:

Quoted 3 lines

It might be that we need a LIBS+= -lm to the Makefile in the root directory. I had strange problems when linking qemu-img/qemu-io/qemu-nbd.

cat > $TMPC << EOF
#include <math.h>
int main(void) { return isnan(sin(0.0)); }
EOF
if compile_prog "" "" ; then
:
elif compile_prog "" "-lm" ; then
LIBS="-lm $LIBS"
libs_qga="-lm $libs_qga"
else
error_exit "libm check failed"
fi

Quoted 1 line

Shouldn't be necessary, should it?

I don't know actually. On my workstation it compiles, but on my build system I need to add this here

Makefile +4 -0
index 423e373..69e1022 100644
@@ -74,6 +74,10 @@ $(call set-vpath, $(SRC_PATH))
 
 LIBS+=-lz $(LIBS_TOOLS)
 
+ifndef CONFIG_HAIKU
+LIBS+=-lm
+endif
+
 HELPERS-$(CONFIG_LINUX) = qemu-bridge-helper$(EXESUF)
 
 ifdef BUILD_DOCS

Otherwise I get unresolved references to log and exp...

I found that the above is only in /x86_64-softmmu/Makefile, but not in /Makefile

Peter