Re: [Qemu-devel] [PATCH v3 2/5] [RFC] libqblock, user example

2012-08-30 Thread Wenchao Xia
于 2012-8-30 15:46, Paolo Bonzini 写道: Il 30/08/2012 03:59, Wenchao Xia ha scritto: Busy waiting is not acceptable, and this is the reason why I had suggested to keep AIO out of the design for now. You need to provide an implementation of AIO for either glib or something else, but this is best

Re: [Qemu-devel] [PATCH v3 2/5] [RFC] libqblock, user example

2012-08-30 Thread Paolo Bonzini
Il 30/08/2012 03:59, Wenchao Xia ha scritto: >>> >> >> Busy waiting is not acceptable, and this is the reason why I had >> suggested to keep AIO out of the design for now. >> >> You need to provide an implementation of AIO for either glib or >> something else, but this is best done within QEMU firs

Re: [Qemu-devel] [PATCH v3 2/5] [RFC] libqblock, user example

2012-08-29 Thread Wenchao Xia
于 2012-8-29 19:11, Paolo Bonzini 写道: Il 29/08/2012 13:05, Wenchao Xia ha scritto: +printf("checking aio status for %d times.\n", check_times); +while (true == qb_aio_check(broker)) { +check_times++; +usleep(1); +} + Busy waiting is not acceptable, and this is the re

Re: [Qemu-devel] [PATCH v3 2/5] [RFC] libqblock, user example

2012-08-29 Thread Paolo Bonzini
Il 29/08/2012 13:05, Wenchao Xia ha scritto: > +printf("checking aio status for %d times.\n", check_times); > +while (true == qb_aio_check(broker)) { > +check_times++; > +usleep(1); > +} > + Busy waiting is not acceptable, and this is the reason why I had suggested to k

[Qemu-devel] [PATCH v3 2/5] [RFC] libqblock, user example

2012-08-29 Thread Wenchao Xia
In this example, user first create two qcow2 images, and then get the backing file relationship information of them. Then does write and read AIO on them. Signed-off-by: Wenchao Xia --- libqblock/libqblock-test.c | 242 1 files changed, 242 inserti