Statistics
| Branch: | Revision:

root / block / quorum.c @ feature-archipelago

History | View | Annotate | Download (24.1 kB)

# Date Author Comment
0c762736 02/28/2014 07:59 pm Benoît Canet

qmp: Make Quorum error events more palatable.

Insert quorum QMP events documentation alphabetically.

Also change the "ret" errno value by an optional "error" being an strerror(-ret)
in the QUORUM_REPORT_BAD qmp event.

Signed-off-by: Benoit Canet <>...

8a87f3d7 02/21/2014 11:32 pm Max Reitz

quorum: Simplify quorum_open()

Although it may not look like it, this patch simplifies quorum_open().
qdict_array_split() is now able to return QLists with different objects
than only QDicts, therefore it will now do all the work and
quorum_open() does not have to handle reference strings by itself....

1c508d17 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_co_flush().

Makes a vote to select error if any.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

98a7a38f 02/21/2014 11:29 pm Benoît Canet

quorum: Implement recursive .bdrv_recurse_is_first_non_filter in quorum.

This is used to activate quorum snapshot.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

c88a1de5 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_open() and quorum_close().

Example of command line:

-drive if=virtio,driver=quorum,\
children.0.file.filename=1.raw,\
children.0.node-name=1.raw,\
children.0.driver=raw,\
children.1.file.filename=2.raw,\
children.1.node-name=2.raw,\
children.1.driver=raw,\...

95c6bff3 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum mechanism.

This patchset enables the core of the quorum mechanism.
The num_children reads are compared to get the majority version and if this
version exists more than threshold times the guest won't see the error at all.

If a block is corrupted or if an error occurs during an IO or if the quorum...

d55dee20 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_getlength().

Check that every bs file returns the same length.
Otherwise, return -EIO to disable the quorum and
avoid length discrepancy.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

a28e4c40 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_invalidate_cache().

We really want that live migration works with quorum so implement
quorum_invalidate_cache().

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

13e7956e 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_aio_writev and its dependencies.

Writes are mirrored num_children times on num_children devices.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

7db6982a 02/21/2014 11:29 pm Benoît Canet

quorum: Add quorum_aio_readv.

Add code to do num_children reads in parallel and cleanup the structures
afterwards.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>
Signed-off-by: Kevin Wolf <>

27cec15e 02/21/2014 11:29 pm Benoît Canet

quorum: Create quorum.c, add QuorumChildRequest and QuorumAIOCB.

Quorum is a block filter mirroring writes to num_children children.
For reads quorum reads each children and does a vote.
If more than vote_threshold versions are identical the quorum is reached and...

cadebd7a 02/21/2014 11:29 pm Benoît Canet

quorum: Create BDRVQuorumState and BlkDriver and do init.

Create the structure holding the quorum settings and write the minimal block
driver instanciation boilerplate.

Signed-off-by: Benoit Canet <>
Reviewed-by: Max Reitz <>...