[libvirt] [PATCH 7/8] virHostdevPrepareSCSIVHostDevices: Simplify logic

Ján Tomko jtomko at redhat.com
Thu Jun 20 07:33:26 UTC 2019


On Tue, Jun 18, 2019 at 03:04:26PM +0200, Michal Privoznik wrote:
>Couple of things happening in this patch:
>
>1) We can mark the device we're adding onto active list as used
>   way before - when adding it onto temporary list.
>
>2) When actually moving device from a temporary helper list onto
>   the list of active devices we check if the device isn't
>   already there. The same check is performed by
>   virSCSIVHostDeviceListAdd() later. Drop this duplicity.
>
>3) The 'error' label is renamed to 'rollback' to reflect what it
>   is actually doing. While in the rest of the code we don't
>   allow random label names, this source file is different.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/util/virhostdev.c | 41 ++++++++++++++++-------------------------
> 1 file changed, 16 insertions(+), 25 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190620/0206e983/attachment-0001.sig>


More information about the libvir-list mailing list