]> xenbits.xensource.com Git - libvirt.git/commit
nodedev: driver: Swap virMdevctlStart and virMdevctlCreate
authorErik Skultety <eskultet@redhat.com>
Wed, 31 Mar 2021 13:32:44 +0000 (15:32 +0200)
committerJonathon Jongsma <jjongsma@redhat.com>
Mon, 19 Apr 2021 15:24:13 +0000 (10:24 -0500)
commit963888f288b960837912d3a66c527d197a1caa5c
treebe6a1504552717074246c54a9a3e7a618e347ff0
parent94589d1dc86efd8c4f91431e9e4ac3dd80307eb1
nodedev: driver: Swap virMdevctlStart and virMdevctlCreate

"start" in libvirt means - "take this object and create an
instance out of it"

"create" in libvirt most of the time means - "take and XML description,
make an object out of it and use it to create an instance"

This gets confusing with mdevctl which uses "start" for both. So, this
patch proposes to use virMdevctlStart in cases where from libvirt's POV
we're starting a defined device (unlike mdevctl). Similarly, use
virMdevctlCreate in scenarios where XML description is passed to
libvirt and a transient device is supposed to be created.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
17 files changed:
src/node_device/node_device_driver.c
src/node_device/node_device_driver.h
tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv [new file with mode: 0644]
tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.json [new file with mode: 0644]
tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv [deleted file]
tests/nodedevmdevctldata/mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.json [deleted file]
tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv [new file with mode: 0644]
tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.json [new file with mode: 0644]
tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.argv [deleted file]
tests/nodedevmdevctldata/mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-start.json [deleted file]
tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv [new file with mode: 0644]
tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.json [new file with mode: 0644]
tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.argv [deleted file]
tests/nodedevmdevctldata/mdev_fedc4916_1ca8_49ac_b176_871d16c13076-start.json [deleted file]
tests/nodedevmdevctldata/mdevctl-create.argv [deleted file]
tests/nodedevmdevctldata/mdevctl-start.argv [new file with mode: 0644]
tests/nodedevmdevctltest.c