On 12/16/2014 07:56 AM, Peter Krempa wrote: > On 12/16/14 09:04, Eric Blake wrote: >> Create a helper function that can be reused for gathering block >> info from virDomainListGetStats. >> >> * src/qemu/qemu_driver.c (qemuDomainGetBlockInfo): Split guts... >> (qemuStorageLimitsRefresh): ...into new helper function. >> >> +qemuStorageLimitsRefresh(virQEMUDriverPtr driver, virQEMUDriverConfigPtr cfg, >> + virDomainObjPtr vm, virDomainDiskDefPtr disk, >> + virStorageSourcePtr src) > > One argument per line please. Fixed (which included dropping 'disk' as it was no longer used), >> + if (virStorageSourceIsLocalStorage(src)) { >> /* Yes, this is a mild TOCTTOU race, but if someone is >> * changing files in the background behind libvirt's back, >> * they deserve bogus information. */ >> - if (stat(disk->src->path, &sb) < 0) { >> + if (stat(src->path, &sb) < 0) { > > Here you'll get a context conflict after fixing earlier patch. retested that my adjustments were sane, > >> virReportSystemError(errno, >> - _("cannot stat file '%s'"), disk->src->path); >> - goto endjob; >> + _("cannot stat file '%s'"), src->path); >> + goto cleanup; >> } >> > > [...] > > ACK, and pushed through here. -- 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