[libvirt] [PATCH 4/7] virsh: nodedev: ability to filter CCW capabilities

Bjoern Walk bwalk at linux.vnet.ibm.com
Fri May 26 07:00:36 UTC 2017


John Ferlan <jferlan at redhat.com> [2017-05-25, 03:21PM -0400]:
>
>
>On 05/22/2017 02:38 AM, Bjoern Walk wrote:
>> Now that the node_device driver is aware of CCW devices, let's hook up
>> virsh so that we can filter them properly.
>>
>> Reviewed-by: Boris Fiuczynski <fiuczy at linux.vnet.ibm.com>
>> Reviewed-by: Marc Hartmayer <mhartmay at linux.vnet.ibm.com>
>> Signed-off-by: Bjoern Walk <bwalk at linux.vnet.ibm.com>
>> ---
>>  docs/formatnode.html.in           | 12 ++++++++++++
>>  include/libvirt/libvirt-nodedev.h |  1 +
>>  src/conf/node_device_conf.h       |  3 ++-
>>  src/conf/virnodedeviceobj.c       |  3 ++-
>>  src/libvirt-nodedev.c             |  1 +
>>  tools/virsh-nodedev.c             |  3 ++-
>>  tools/virsh.pod                   |  2 +-
>>  7 files changed, 21 insertions(+), 4 deletions(-)
>>
>
>
>...
>
>> diff --git a/src/conf/virnodedeviceobj.c b/src/conf/virnodedeviceobj.c
>> index 02ac54437..d460f26ec 100644
>> --- a/src/conf/virnodedeviceobj.c
>> +++ b/src/conf/virnodedeviceobj.c
>> @@ -568,7 +568,8 @@ virNodeDeviceMatch(virNodeDeviceObjPtr devobj,
>>                MATCH(SCSI_GENERIC)  ||
>>                MATCH(DRM)           ||
>>                MATCH(MDEV_TYPES)    ||
>> -              MATCH(MDEV)))
>> +              MATCH(MDEV)          ||
>> +              MATCH(CCW_DEV)))
>>              return false;
>>      }
>>
>
>But you didn't modify virNodeDeviceCapMatch in order perform the match
>that the MATCH does.
>

Damn, there's a lot that you can miss with these capabilities.

>Also, another well hidden gem that either Erik Skultety or myself will
>fix "eventually" is virNodeDeviceObjHasCap.  See commit id 'e8fcac8ec'
>for some context.  Essentially, the virNodeDeviceMatch only matches for
>the virNodeDeviceObjListExport API.
>

And even more. Thanks for the pointers.

>If you want to send something to squash in or just a v2 of this patch -
>I can handle either.
>
>Reviewed-by: John Ferlan <jferlan at redhat.com>

Thanks.

>
>John
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
>

-- 
IBM Systems
Linux on z Systems & Virtualization Development
------------------------------------------------------------------------
IBM Deutschland
Schönaicher Str. 220
71032 Böblingen
Phone: +49 7031 16 1819
E-Mail: bwalk at de.ibm.com
------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 896 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170526/1bf1af96/attachment-0001.sig>


More information about the libvir-list mailing list