Commit b74440d8 authored by Elijah Conners's avatar Elijah Conners Committed by Tejun Heo

iocost_monitor: reorder BlkgIterator

In order to comply with PEP 8, the first parameter of a class should be
__init__.
Signed-off-by: default avatarElijah Conners <business@elijahpepe.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 61c41711
...@@ -61,6 +61,11 @@ autop_names = { ...@@ -61,6 +61,11 @@ autop_names = {
} }
class BlkgIterator: class BlkgIterator:
def __init__(self, root_blkcg, q_id, include_dying=False):
self.include_dying = include_dying
self.blkgs = []
self.walk(root_blkcg, q_id, '')
def blkcg_name(blkcg): def blkcg_name(blkcg):
return blkcg.css.cgroup.kn.name.string_().decode('utf-8') return blkcg.css.cgroup.kn.name.string_().decode('utf-8')
...@@ -82,11 +87,6 @@ class BlkgIterator: ...@@ -82,11 +87,6 @@ class BlkgIterator:
blkcg.css.children.address_of_(), 'css.sibling'): blkcg.css.children.address_of_(), 'css.sibling'):
self.walk(c, q_id, path) self.walk(c, q_id, path)
def __init__(self, root_blkcg, q_id, include_dying=False):
self.include_dying = include_dying
self.blkgs = []
self.walk(root_blkcg, q_id, '')
def __iter__(self): def __iter__(self):
return iter(self.blkgs) return iter(self.blkgs)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment