Re: [PATCH v3 09/13] ch: assign aliases in ProcessPrepareDomain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/4/25 14:10, Stefan Kober wrote:
> This is required to have unique device aliases for devices throughout
> the domain lifecycle.
> 
> On-behalf-of: SAP stefan.kober@xxxxxxx
> Signed-off-by: Stefan Kober <stefan.kober@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  src/ch/ch_process.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/ch/ch_process.c b/src/ch/ch_process.c
> index cd2e88af1e..550bfefae1 100644
> --- a/src/ch/ch_process.c
> +++ b/src/ch/ch_process.c
> @@ -24,6 +24,7 @@
>  #include <fcntl.h>
>  #include <poll.h>
>  
> +#include "ch_alias.h"
>  #include "ch_domain.h"
>  #include "ch_monitor.h"
>  #include "ch_process.h"
> @@ -889,6 +890,9 @@ virCHProcessPrepareDomain(virDomainObj *vm)
>      if (virCHProcessPrepareDomainHostdevs(vm) < 0)
>          return -1;
>  
> +    if (chAssignDeviceAliases(vm->def) < 0)
> +        return -1;
> +

I'd do this before preparing hostdevs. While it's strictly not needed
currently, it may happen that a hostdev code would expect device aliases
to be set (e.g. in case of QEMU driver the SCSI detach code expects that).

>      return 0;
>  }
>  

Michal




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux