[libvirt] [PATCH v4 03/20] qemu: Allow optional export name during NBD export

Eric Blake eblake at redhat.com
Mon Feb 25 16:18:30 UTC 2019


On 2/25/19 9:53 AM, Eric Blake wrote:
> On 2/9/19 9:41 AM, John Ferlan wrote:
>>
>>
>> On 2/6/19 2:18 PM, Eric Blake wrote:
>>> Right now, we only use NBD exports during storage migration,
>>> where we control the NBD client and therefore don't care about
>>> the export name (qemu's default of naming the export after the
>>> device is fine). But upcoming patches for exposing backups over
>>> NBD wants to use a different export name (matching the libvirt
>>> domain XML rather than the qemu device name); so enhance the
>>> QMP glue code to allow this flexibility.
>>>
>>> Signed-off-by: Eric Blake <eblake at redhat.com>
>>> ---
>>>  src/qemu/qemu_monitor.h      | 1 +
>>>  src/qemu/qemu_monitor_json.h | 1 +
>>>  src/qemu/qemu_migration.c    | 2 +-
>>>  src/qemu/qemu_monitor.c      | 5 +++--
>>>  src/qemu/qemu_monitor_json.c | 2 ++
>>>  tests/qemumonitorjsontest.c  | 2 +-
>>>  6 files changed, 9 insertions(+), 4 deletions(-)
>>>
>>
>> I assume/hope some day a test will be added that will show what the
>> @export variable does.  I haven't read ahead at all - I'm trying to just
>> go in order and get some feedback sooner so you can start pushing stuff.
>>
>> Reviewed-by: John Ferlan <jferlan at redhat.com>
> 
> Yes, I need to do better at in-tree tests (and not just stuff I've
> mentioned in the commit messages) for my v5.  The export name gets used
> during pull-style backups, where I purposefully went with naming the
> exports 'vda' and 'vdb' for a guest with two disks, rather than based on
> any file name or block node name; 'qemu-nbd --list' connected to the NBD
> server during a pull backup is an easy way of testing the export names
> made it through the stack.
> 

For that matter, I'm probably just going to squash this patch in with
15/20, and do all the QMP monitor changes in one patch.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




More information about the libvir-list mailing list