Skip to content

Commit

Permalink
blkcg: restructure statistics printing
Browse files Browse the repository at this point in the history
blkcg stats handling is a mess.  None of the stats has much to do with
blkcg core but they are all implemented in blkcg core.  Code sharing
is achieved by mixing common code with hard-coded cases for each stat
counter.

This patch restructures statistics printing such that

* Common logic exists as helper functions and specific print functions
  use the helpers to implement specific cases.

* Printing functions serving multiple counters don't require hardcoded
  switching on specific counters.

* Printing uses read_seq_string callback (other methods will be phased
  out).

This change enables further cleanups and relocating stats code to the
policy implementation it belongs to.

Signed-off-by: Tejun Heo <tj@kernel.org>
  • Loading branch information
Tejun Heo committed Apr 1, 2012
1 parent edcb072 commit d3d32e6
Show file tree
Hide file tree
Showing 2 changed files with 243 additions and 374 deletions.
Loading

0 comments on commit d3d32e6

Please sign in to comment.