core: introduce CGroupIOLimitType enums
authorTejun Heo <htejun@fb.com>
Wed, 18 May 2016 20:50:56 +0000 (13:50 -0700)
committerTejun Heo <tj@kernel.org>
Wed, 18 May 2016 20:50:56 +0000 (13:50 -0700)
commit9be572497df8dd0a076c3a2c9142e25b1106aa60
tree3e40c07f8014eef9d57554b52f85841f0f674730
parent4e080f502a5cd6e538a03472070aae8a730c15e9
core: introduce CGroupIOLimitType enums

Currently, there are two cgroup IO limits, bandwidth max for read and write,
and they are hard-coded in various places.  This is fine for two limits but IO
is expected to grow more limits - low, high and max limits for bandwidth and
IOPS - and hard-coding each limit won't make sense.

This patch replaces hard-coded limits with an array indexed by
CGroupIOLimitType and accompanying string and default value tables so that new
limits can be added trivially.
src/basic/cgroup-util.c
src/basic/cgroup-util.h
src/core/cgroup.c
src/core/cgroup.h
src/core/dbus-cgroup.c
src/core/load-fragment.c
src/shared/bus-unit-util.c
src/systemctl/systemctl.c