On 12/17/2013 01:45 PM, Eric Blake wrote: > On 12/17/2013 01:42 PM, Eric Blake wrote: >> On 12/17/2013 10:04 AM, Wout Mertens wrote: >>> From: Wout Mertens <Wout.Mertens@xxxxxxxxx> >>> >>> vmx/vmx.c ignores the transient attribute on the disk xml format. This patch >>> adds a 1-1 relationship between it and [disk].mode = "independent-nonpersistent". >>> >>> The other modes are ignored as before. It works in my testing. >>> >>> https://bugzilla.redhat.com/show_bug.cgi?id=1044023 >>> >>> --- >>> src/vmx/vmx.c | 17 ++++++++++++++++- >>> 1 file changed, 16 insertions(+), 1 deletion(-) >> >> Congrats on your first libvirt patch. It failed 'make syntax-check': >> > >> >> But I don't mind fixing those on a first-time submission. > > Oh, I spoke too soon. It also fails 'make check': > > ../build-aux/test-driver: line 95: 19280 Segmentation fault (core > dumped) "$@" > $log_file 2>&1 > FAIL: vmx2xmltest > > Not a good sign. I can still try and fix that before pushing, but for > now your patch is not upstream. Found it. Would you also be willing to do a followup patch to enhance the testsuite to add a case of a vmx file that gets translated into the <transient> libvirt xml? Pushed now, with this added: diff --git i/src/vmx/vmx.c w/src/vmx/vmx.c index c04e397..8fb2a93 100644 --- i/src/vmx/vmx.c +++ w/src/vmx/vmx.c @@ -2181,7 +2181,9 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con (*def)->src = ctx->parseFileName(fileName, ctx->opaque); (*def)->cachemode = writeThrough ? VIR_DOMAIN_DISK_CACHE_WRITETHRU : VIR_DOMAIN_DISK_CACHE_DEFAULT; - (*def)->transient = STRCASEEQ(mode, "independent-nonpersistent"); + if (mode) + (*def)->transient = STRCASEEQ(mode, + "independent-nonpersistent"); if ((*def)->src == NULL) { goto cleanup; @@ -2300,6 +2302,7 @@ virVMXParseDisk(virVMXContext *ctx, virDomainXMLOptionPtr xmlopt, virConfPtr con VIR_FREE(deviceType); VIR_FREE(fileType); VIR_FREE(fileName); + VIR_FREE(mode); return result; -- 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