]> git.baikalelectronics.ru Git - kernel.git/commit
blk-throttle: cap discard request size
authorShaohua Li <shli@fb.com>
Fri, 18 Aug 2017 23:08:13 +0000 (16:08 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 23 Aug 2017 21:56:33 +0000 (15:56 -0600)
commitd64b4ac7971040f00c905e148f28b7d05e62244e
tree462c57a8375b3c19d642d11dc43344a6f7aecab7
parent90cb3465938de06e33380747273c1215aaea1541
blk-throttle: cap discard request size

discard request usually is very big and easily use all bandwidth budget
of a cgroup. discard request size doesn't really mean the size of data
written, so it doesn't make sense to account it into bandwidth budget.
Jens pointed out treating the size 0 doesn't make sense too, because
discard request does have cost. But it's not easy to find the actual
cost. This patch simply makes the size one sector.

Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c