]> git.baikalelectronics.ru Git - kernel.git/commit
blkcg: refine error codes returned during blkcg configuration
authorTejun Heo <tj@kernel.org>
Tue, 18 Aug 2015 21:55:28 +0000 (14:55 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 18 Aug 2015 22:49:18 +0000 (15:49 -0700)
commitfe3452e3dfa5e82accfb989787b82f2fc8bfec1b
treef1fe9b3a30a3afce0ea20632b830007495d95b0a
parent58a122a92e861f6fab2e6bdf180c1a03b6eaff31
blkcg: refine error codes returned during blkcg configuration

blkcg currently returns -EINVAL for most errors which can be pretty
confusing given that the failure modes are quite varied.  Update the
error returns so that

* -EINVAL only for syntactic errors.
* -ERANGE if the value is out of range.
* -ENODEV if the target device can't be found.
* -EOPNOTSUPP if the policy is not enabled on the target device.

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