[libvirt] Quorum block driver libvirt support proposal
Eric Blake
eblake at redhat.com
Fri May 16 14:35:17 UTC 2014
On 05/16/2014 04:33 AM, Benoît Canet wrote:
>
> I want to make use of the new backingStore xml element to implement quorum.
>
> Proposed Quorum libvirt format:
> -------------------------------
>
> <disk type='quorum' device='disk'>
> <driver name='qemu' type='quorum'/>
> <threshold value=2/>
Rather than making <threshold> a sub-element, I'd stick it as an
attribute, as in:
<disk type='quorum' threshold='2' device='disk'>
>
> * Add VIR_STORAGE_TYPE_QUORUM
>
> * In src/util/virstoragefile.h change _virStorageSource to contain a
> virStorageSourcePtrPtr backingStores.
PtrPtr doesn't make sense. Just keep it as a single pointer, but add an
nBackingStores field and treat it as an array (all existing callers are
now an array of 1, quorum is a new array of N).
> I think doing it at this level allow to keep a 1-1 mapping with the qemu
> BlockDriverState hiearchy
>
> * Add a int quorum_threshold field to the same structure
size_t, not int
>
> * Add support for parsing treshold in virDomainDiskDefParseXML
>
> * Change virDomainDiskBackingStoreParse to virDomainDiskBackingStoresParse to parse
> all the backingStore at once an use realloc to grow the backingStores field.
>
> * Modify virDomainDiskDefFormat to call virDomainDiskBackingStoreFormat in a loop
> for saving
>
> * hook into qemuBuildDriveStr around line 3442 to create the quorum parameters
>
> Do you feel that I am missing something ?
We'll probably find more as you go, but this sounds like a reasonable start
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140516/9278ca1c/attachment-0001.sig>
More information about the libvir-list
mailing list