]>
git.proxmox.com Git - mirror_qemu.git/blob - block/quorum.c
4 * Copyright (C) 2012-2014 Nodalink, EURL.
7 * BenoƮt Canet <benoit.canet@irqsave.net>
9 * Based on the design and code of blkverify.c (Copyright (C) 2010 IBM, Corp)
10 * and blkmirror.c (Copyright (C) 2011 Red Hat, Inc).
12 * This work is licensed under the terms of the GNU GPL, version 2 or later.
13 * See the COPYING file in the top-level directory.
16 #include "block/block_int.h"
18 typedef struct QuorumAIOCB QuorumAIOCB
;
20 /* Quorum will create one instance of the following structure per operation it
21 * performs on its children.
22 * So for each read/write operation coming from the upper layer there will be
23 * $children_count QuorumChildRequest.
25 typedef struct QuorumChildRequest
{
26 BlockDriverAIOCB
*aiocb
;
33 /* Quorum will use the following structure to track progress of each read/write
34 * operation received by the upper layer.
35 * This structure hold pointers to the QuorumChildRequest structures instances
36 * used to do operations on each children and track overall progress.
39 BlockDriverAIOCB common
;
41 /* Request metadata */
45 QEMUIOVector
*qiov
; /* calling IOV */
47 QuorumChildRequest
*qcrs
; /* individual child requests */
48 int count
; /* number of completed AIOCB */
49 int success_count
; /* number of successfully completed AIOCB */