On Wed, Oct 12, 2022 at 12:37:58PM +0200, Michal Privoznik wrote: > During its initialization, the QEMU driver iterates over > hugetlbfs mount points, creating the driver specific path in each > of them ($prefix/libvirt/qemu). This path is created with very > wide mode (0777) because per-domain directories are then created > under it. > > Separate this code into a function so that it can be re-used. > > Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> > --- > src/qemu/qemu_conf.c | 27 +++++++++++++++++++++++++++ > src/qemu/qemu_conf.h | 3 +++ > src/qemu/qemu_driver.c | 17 +---------------- > 3 files changed, 31 insertions(+), 16 deletions(-) > > diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c > index 4f59e5fb07..c20fec26ba 100644 > --- a/src/qemu/qemu_conf.c > +++ b/src/qemu/qemu_conf.c > @@ -1576,3 +1576,30 @@ qemuGetMemoryBackingPath(virQEMUDriver *driver, > *memPath = g_strdup_printf("%s/%s", domainPath, alias); > return 0; > } > + > + > +int > +qemuMkdirBaseHugepage(virQEMUDriver *driver, > + virHugeTLBFS *hugepage) Apart from virDomainHugepage we don't have another naming precedent Hugepage functions, hence I'd like to propose qemuHugepageMakeBasedir instead. Reviewed-by: Erik Skultety <eskultet@xxxxxxxxxx>