Signed-off-by: Benoit Canet <ben...@irqsave.net> --- block/qorum.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
diff --git a/block/qorum.c b/block/qorum.c index 3341021..5b4f031 100644 --- a/block/qorum.c +++ b/block/qorum.c @@ -13,3 +13,33 @@ * See the COPYING file in the top-level directory. */ +#include "block_int.h" + +typedef struct QorumAIOCB QorumAIOCB; + +typedef struct QorumSingleAIOCB { + BlockDriverAIOCB *aiocb; + char *buf; + int ret; + QorumAIOCB *parent; +} QorumSingleAIOCB; + +struct QorumAIOCB { + BlockDriverAIOCB common; + QEMUBH *bh; + + /* Request metadata */ + bool is_write; + int64_t sector_num; + int nb_sectors; + + QEMUIOVector *qiov; /* calling readv IOV */ + + QorumSingleAIOCB aios[3]; /* individual AIOs */ + QEMUIOVector qiovs[3]; /* individual IOVs */ + int count; /* number of completed AIOCB */ + bool *finished; /* completion signal for cancel */ + + void (*vote)(QorumAIOCB *acb); + int vote_ret; +}; -- 1.7.9.5