This patchset create a block driver implementing a qorum using three qemu disk images. Writes are mirrored on the three files. For the reading part the three files are read at the same time and a vote is done to determine which is the majoritary qiov version. It then return this majoritary version to the upper layers. When three differents versions of the data are returned by the lower layer the qorum is broken and the read return -EIO.
The goal of this patchset is to be turned in a QEMU block filter living just above raw-*.c and below qcow2/qed when the required infrastructure will be done. Main use of this feature will be people using NFS appliances which can be subjected to bitflip errors. usage: -drive file=qorum:image1.raw:image2.raw:image3.raw,if=virtio,cache=none Benoît Canet (12): qorum: Add GPL v2+ header file. qorum: Add QorumSingleAIOCB and QorumAIOCB. qorum: Create BDRVQorumState and BlkDriver and do init. qorum: Add qorum_open(). qorum: Add qorum_close(). qorum: Add qorum_getlength(). qorum: Add qorum_aio_writev and its dependencies. blkverify: Make blkverify_iovec_clone() and blkverify_iovec_compare() public qorum: Add qorum_co_flush(). qorum: Add qorum_aio_readv. qorum: Add qorum mechanism. qorum: build feature into QEMU. block/Makefile.objs | 1 + block/blkverify.c | 8 +- block/qorum.c | 393 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 400 insertions(+), 2 deletions(-) create mode 100644 block/qorum.c -- 1.7.9.5