]> git.proxmox.com Git - mirror_qemu.git/commit - block/quorum.c
quorum: Forbid adding children in blkverify mode
authorAlberto Garcia <berto@igalia.com>
Thu, 18 Oct 2018 08:59:03 +0000 (11:59 +0300)
committerKevin Wolf <kwolf@redhat.com>
Mon, 5 Nov 2018 14:09:54 +0000 (15:09 +0100)
commit808b27d464287666821483257289b1a3379264b2
tree1d9cecb2bec37f73be67a9b7226f2090773d6be1
parent82c4c85978da41294fbd1d621fec373a4be6788f
quorum: Forbid adding children in blkverify mode

The blkverify mode of Quorum only works when the number of children is
exactly two, so any attempt to add a new one must return an error.

quorum_del_child() on the other hand doesn't need any additional check
because decreasing the number of children would make it go under the
vote threshold.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/quorum.c