Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-14 Thread Tejun Heo
On Mon, Jul 14, 2014 at 10:13:27AM +0800, Li Zefan wrote: > I think we should remove this flag in cgroup_rm_cftypes_locked(). Otherwise > if we call cgroup_add_dlf_cftypes() and then cgroup_rm_cftypes() and then > cgroup_add_legacy_cftypes() for the same @cfts, both CFTYPE_ONLY_ON_DFL and >

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-14 Thread Tejun Heo
On Mon, Jul 14, 2014 at 10:13:27AM +0800, Li Zefan wrote: I think we should remove this flag in cgroup_rm_cftypes_locked(). Otherwise if we call cgroup_add_dlf_cftypes() and then cgroup_rm_cftypes() and then cgroup_add_legacy_cftypes() for the same @cfts, both CFTYPE_ONLY_ON_DFL and

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-13 Thread Li Zefan
> @@ -3085,8 +3091,37 @@ static int cgroup_add_cftypes(struct cgroup_subsys > *ss, struct cftype *cfts) > return ret; > } > > +/** > + * cgroup_add_dfl_cftypes - add an array of cftypes for default hierarchy > + * @ss: target cgroup subsystem > + * @cfts: zero-length name terminated

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-13 Thread Li Zefan
@@ -3085,8 +3091,37 @@ static int cgroup_add_cftypes(struct cgroup_subsys *ss, struct cftype *cfts) return ret; } +/** + * cgroup_add_dfl_cftypes - add an array of cftypes for default hierarchy + * @ss: target cgroup subsystem + * @cfts: zero-length name terminated array of

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-03 Thread Neil Horman
On Wed, Jul 02, 2014 at 07:50:54PM -0400, Tejun Heo wrote: > Until now, cftype arrays carried files for both the default and legacy > hierarchies and the files which needed to be used on only one of them > were flagged with either CFTYPE_ONLY_ON_DFL or CFTYPE_INSANE. This > gets confusing very

Re: [PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-03 Thread Neil Horman
On Wed, Jul 02, 2014 at 07:50:54PM -0400, Tejun Heo wrote: Until now, cftype arrays carried files for both the default and legacy hierarchies and the files which needed to be used on only one of them were flagged with either CFTYPE_ONLY_ON_DFL or CFTYPE_INSANE. This gets confusing very

[PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-02 Thread Tejun Heo
Until now, cftype arrays carried files for both the default and legacy hierarchies and the files which needed to be used on only one of them were flagged with either CFTYPE_ONLY_ON_DFL or CFTYPE_INSANE. This gets confusing very quickly and we may end up exposing interface files to the default

[PATCH 4/5] cgroup: distinguish the default and legacy hierarchies when handling cftypes

2014-07-02 Thread Tejun Heo
Until now, cftype arrays carried files for both the default and legacy hierarchies and the files which needed to be used on only one of them were flagged with either CFTYPE_ONLY_ON_DFL or CFTYPE_INSANE. This gets confusing very quickly and we may end up exposing interface files to the default