[PATCH v1 12/34] qemuDomainNamespaceMknodPaths: Create more files in one go

Ján Tomko jtomko at redhat.com
Fri Jul 24 15:10:39 UTC 2020


On a Wednesday in 2020, Michal Privoznik wrote:
>While the previous commit prepared the helper function run in a
>forked off helper (with corresponding struct), this commit
>modifies the caller, which now create all files requested in a
>single process and does not fork off for every single path.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/qemu/qemu_domain_namespace.c | 89 ++++++++++++--------------------
> 1 file changed, 32 insertions(+), 57 deletions(-)
>
>diff --git a/src/qemu/qemu_domain_namespace.c b/src/qemu/qemu_domain_namespace.c
>index 31acf2bde6..b9f8c32770 100644
>--- a/src/qemu/qemu_domain_namespace.c
>+++ b/src/qemu/qemu_domain_namespace.c
>@@ -1385,12 +1385,12 @@ qemuDomainMknodItemInit(qemuDomainMknodItemPtr item,
>
>
> static int
>-qemuDomainAttachDeviceMknodOne(qemuDomainMknodDataPtr data,
>-                               virQEMUDriverConfigPtr cfg,
>-                               virDomainObjPtr vm,
>-                               const char *file,
>-                               char * const *devMountsPath,
>-                               size_t ndevMountsPath)
>+qemuDomainNamespacePrepareOne(qemuDomainMknodDataPtr data,

Consider: PrepareItem or PrepareOneItem

>+                              virQEMUDriverConfigPtr cfg,
>+                              virDomainObjPtr vm,
>+                              const char *file,
>+                              char * const *devMountsPath,
>+                              size_t ndevMountsPath)
> {
>     long ttl = sysconf(_SC_SYMLOOP_MAX);
>     const char *next = file;

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/20200724/b3f8ebbf/attachment-0001.sig>


More information about the libvir-list mailing list