On 03/31/2014 02:56 AM, Peter Krempa wrote: > On 03/29/14 23:20, Eric Blake wrote: >> Now that we have a common struct, it's time to start using it! >> Since external snapshots make a longer backing chain, it is >> only natural to use the same struct for the file created by >> the snapshot as what we use for <domain> disks. >> > > Hmm, now that we have a common struct, we can unify the source formatter > and have it accept the common struct instead of splitting out separate > fields ... > >> type, >> - disk->file, >> + disk->src.path, >> 0, >> - disk->protocol, >> - disk->nhosts, >> - disk->hosts, >> + disk->src.protocol, >> + disk->src.nhosts, >> + disk->src.hosts, >> 0, NULL, NULL, 0); >> Yep, you've guessed one of my future patches. >> @@ -12874,9 +12876,9 @@ qemuDomainSnapshotCreateSingleDiskActive(virQEMUDriverPtr driver, >> >> disk->src.path = newsource; >> disk->src.format = format; >> - disk->src.type = snap->type; >> - disk->src.protocol = snap->protocol; >> - disk->src.nhosts = snap->nhosts; >> + disk->src.type = snap->src.type; >> + disk->src.protocol = snap->src.protocol; >> + disk->src.nhosts = snap->src.nhosts; >> disk->src.hosts = newhosts; > > And here we can introduce a function to copy the source instead of doing > it manually. Also a future patch that I was already planning on :) > > ACK to the patch. The proposed changes are definitely separable and > better to review separately. Good - we're on the same page. Again, I'm waiting for this series until after 1.2.3 is out, but glad that it is ACKed so far. -- 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