Re: [PATCH v1 01/14] vircgroup: add virCgroupSetupBlkioTune()

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

 



On 2/11/20 7:28 AM, Daniel Henrique Barboza wrote:
> 
> 
> On 2/10/20 10:39 PM, Ján Tomko wrote:
>> On Mon, Feb 10, 2020 at 07:05:07PM -0300, Daniel Henrique Barboza wrote:
>>> This new util function puts the duplicated code from
>>> qemu_cgroup.c:qemuSetupBlkioCgroup() and
>>> lxc_cgroup.c:virLXCCgroupSetupBlkioTune() in a single
>>> function to be used in both places.
>>>
>>> Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx>
>>> ---
>>> src/libvirt_private.syms |  1 +
>>> src/lxc/lxc_cgroup.c     | 49 +----------------------------------
>>> src/qemu/qemu_cgroup.c   | 47 +---------------------------------
>>> src/util/vircgroup.c     | 55 ++++++++++++++++++++++++++++++++++++++++
>>> src/util/vircgroup.h     |  3 +++
>>> 5 files changed, 61 insertions(+), 94 deletions(-)
>>>
>>> diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c
>>> index 0680ff7c24..0d83e2094f 100644
>>> --- a/src/util/vircgroup.c
>>> +++ b/src/util/vircgroup.c
>>> @@ -35,6 +35,7 @@
>>> #define LIBVIRT_VIRCGROUPPRIV_H_ALLOW
>>> #include "vircgrouppriv.h"
>>>
>>> +#include "conf/domain_conf.h"
>>> #include "virutil.h"
>>> #include "viralloc.h"
>>> #include "vircgroupbackend.h"
>>> diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
>>> index 15263f534a..d2d7e7ab51 100644
>>> --- a/src/util/vircgroup.h
>>> +++ b/src/util/vircgroup.h
>>> @@ -24,6 +24,7 @@
>>> #include "virutil.h"
>>> #include "virbitmap.h"
>>> #include "virenum.h"
>>> +#include "conf/virconftypes.h"
>>>
>>
>> src/util should be below src/conf and not including stuff from it
>> (even though we do have some debt there at the moment)
>>
>> The last time this came up:
>> https://www.redhat.com/archives/libvir-list/2018-June/msg00381.html
>>
>> And there should've been a syntax-check rule yelling about this,
>> but I see the out-of-srcdir build broke it:
>> https://www.redhat.com/archives/libvir-list/2020-February/msg00442.html
> 
> 
> Just saw that you fixed this check on newest master. syntax-check is not
> pleased with these patches anymore.
> 
> I'll send a v2.

I asked about this case in December, danpb suggested creating a new
src/hypervisor/ directory for containing shared driver code like this:

https://www.redhat.com/archives/libvir-list/2019-December/msg00817.html

- Cole





[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