[libvirt] [PATCH 04/13] qemu: support named nbd exports

Eric Blake eblake at redhat.com
Fri Mar 15 21:13:34 UTC 2013


On 03/10/2013 09:45 PM, Osier Yang wrote:
> On 2013年02月26日 01:44, Paolo Bonzini wrote:
>> These are supported by nbd-server and by the NBD server that QEMU
>> embeds for live image access.
>>
>> Signed-off-by: Paolo Bonzini<pbonzini at redhat.com>
>> ---

>> +++ b/src/qemu/qemu_command.c
>> @@ -2132,6 +2132,7 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
>>   {
>>       virDomainDiskHostDefPtr h = NULL;
>>       char *host, *port;
>> +    char *src;
>>
>>       if (VIR_ALLOC(h)<  0)
>>           goto no_memory;
>> @@ -2149,11 +2150,24 @@ qemuParseNBDString(virDomainDiskDefPtr disk)
>>       if (!h->name)
>>           goto no_memory;
>>
>> +    src = strchr(port, ':');
>> +    if (src)
> 
> if (!(src = strchr(port, ':')))

Not worth compressing, since our HACKING doesn't mandate it.

> ACK with the coding style changed to be consistent.

I did make one tweak:

> +++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-drive-network-nbd-export.args
> @@ -0,0 +1,5 @@
> +LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M \
> +pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait \
> +-no-acpi -boot c -usb -drive file=/dev/HostVG/QEMUGuest1,if=ide,bus=0,unit=0 -drive \
> +file=nbd:example.org:6000:exportname=bar,if=virtio,format=raw -net none -serial none \
> +-parallel none

These lines were longer than 80 columns, so I redid where the
backslash-newline pairs lived.  Now pushed.

-- 
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130315/406738e0/attachment-0001.sig>


More information about the libvir-list mailing list