]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - block/blk-cgroup.c
blkcg: make blkcg_print_blkgs() grab q locks instead of blkcg lock
authorTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:13 +0000 (08:05 -0800)
committerTejun Heo <tj@kernel.org>
Wed, 9 Jan 2013 16:05:13 +0000 (08:05 -0800)
commit810ecfa765f8be20c8d9c468885b3403a2232d2f
tree0c9173defed8de28cf43d972b8e36b48fbcc6f24
parent548bc8e1b38e48653a90f48f636f8d253504f8a2
blkcg: make blkcg_print_blkgs() grab q locks instead of blkcg lock

Instead of holding blkcg->lock while walking ->blkg_list and executing
prfill(), RCU walk ->blkg_list and hold the blkg's queue lock while
executing prfill().  This makes prfill() implementations easier as
stats are mostly protected by queue lock.

This will be used to implement hierarchical stats.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Vivek Goyal <vgoyal@redhat.com>
block/blk-cgroup.c