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
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list