diff options
author | Tejun Heo <tj@kernel.org> | 2013-01-09 08:05:12 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2013-01-09 08:05:12 -0800 |
commit | b276a876a014c5fa58a16f247c0933f6c42112e3 (patch) | |
tree | c49f85e03d11296683ed938864bd823cdeaa614f /block/blk-cgroup.c | |
parent | d02f7aa8dce8166dbbc515ce393912aa45e6b8a6 (diff) |
blkcg: add blkg_policy_data->plid
Add pd->plid so that the policy a pd belongs to can be identified
easily. This will be used to implement hierarchical blkg_[rw]stats.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
Diffstat (limited to 'block/blk-cgroup.c')
-rw-r--r-- | block/blk-cgroup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 10e1df9da46e..3a8de321d1f6 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c @@ -113,6 +113,7 @@ static struct blkcg_gq *blkg_alloc(struct blkcg *blkcg, struct request_queue *q, blkg->pd[i] = pd; pd->blkg = blkg; + pd->plid = i; /* invoke per-policy init */ if (pol->pd_init_fn) @@ -908,6 +909,7 @@ int blkcg_activate_policy(struct request_queue *q, blkg->pd[pol->plid] = pd; pd->blkg = blkg; + pd->plid = pol->plid; pol->pd_init_fn(blkg); spin_unlock(&blkg->blkcg->lock); |