[libvirt] [PATCH 1/2] vircgroup: Add virCgroupSetupBlkiotune()
Ján Tomko
jtomko at redhat.com
Mon Jun 11 14:09:12 UTC 2018
On Tue, Jun 05, 2018 at 05:23:18PM +0200, Fabiano Fidêncio wrote:
>On Tue, Jun 5, 2018 at 4:16 PM, Michal Privoznik <mprivozn at redhat.com> wrote:
>> On 06/03/2018 08:09 PM, Fabiano Fidêncio wrote:
>>> virCgroupSetupBlkiotune() has been introduced in order to remove the
>>> code duplication present between virLXCCgroupSetupBlkioTune() and
>>> qemuSetupBlkioCgroup().
>>>
>>> Signed-off-by: Fabiano Fidêncio <fabiano at fidencio.org>
>>> ---
>>> src/libvirt_private.syms | 1 +
>>> src/lxc/lxc_cgroup.c | 49 +------------------------------------------
>>> src/qemu/qemu_cgroup.c | 47 +----------------------------------------
>>> src/util/vircgroup.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
>>> src/util/vircgroup.h | 3 +++
>>> 5 files changed, 60 insertions(+), 94 deletions(-)
>>>
>>
>>
>>> diff --git a/src/util/vircgroup.h b/src/util/vircgroup.h
>>> index d833927678..bd7e7c6d70 100644
>>> --- a/src/util/vircgroup.h
>>> +++ b/src/util/vircgroup.h
>>> @@ -27,6 +27,7 @@
>>>
>>> # include "virutil.h"
>>> # include "virbitmap.h"
>>> +# include "conf/domain_conf.h"
>>
>> I don't think we want to do this. The point of this code separation is
>> to use src/util/ independently of parsing code (even though we break
>> this rule in two places: src/util/virhostdev.h and
>> src/util/virclosecallbacks.h).
>
>Hmm. Makes sense.
>
This is also pointed out by 'make syntax-check':
src/util/vircgroup.h:30:# include "conf/domain_conf.h"
maint.mk: unsafe cross-directory include
make: *** [cfg.mk:786: sc_prohibit_cross_inclusion] Error 1
Perhaps our HACKING page [0] could use a rework to mention the important
stuff (running make check and make syntax-check with cppi installed) and
we can have the detailed coding style rules somewhere else (many of
those are caught by syntax-check anyway).
Jano
[0] https://libvirt.org/hacking.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180611/683be4a7/attachment-0001.sig>
More information about the libvir-list
mailing list