]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
blkcg: move body parsing from blkg_conf_prep() to its callers
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:55:31 +0000 (14:55 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:18 +0000 (15:49 -0700)
commit36aa9e5f591e84d67aad2c5bff75e413d77660dd
tree228d8986be70359b086c30a453d1fc7ee77cfada
parent880f50e228f80626dff6327a6e281e40286f5228
blkcg: move body parsing from blkg_conf_prep() to its callers

Currently, blkg_conf_prep() expects input to be of the following form

 MAJ:MIN NUM

and reads the NUM part into blkg_conf_ctx->v.  This is quite
restrictive and gets in the way in implementing blkcg interface for
the unified hierarchy.  This patch updates blkg_conf_prep() so that it
expects

 MAJ:MIN BODY_STR

where BODY_STR is an arbitrary string.  blkg_conf_ctx->v is replaced
with ->body which is a char pointer pointing to the start of BODY_STR.
Parsing of the body is moved to blkg_conf_prep()'s callers.

To allow using, for example, strsep() on blkg_conf_ctx->val, it is a
non-const pointer and to accommodate that const is dropped from @input
too.

This doesn't cause any behavior changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-cgroup.c
block/blk-throttle.c
block/cfq-iosched.c
include/linux/blk-cgroup.h