]> git.baikalelectronics.ru Git - kernel.git/commit
blkcg: rename blkcg->cgwb_refcnt to ->online_pin and always use it
authorTejun Heo <tj@kernel.org>
Wed, 24 Jul 2019 17:37:22 +0000 (10:37 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 1 Apr 2020 20:56:42 +0000 (14:56 -0600)
commit52dc78b4d394b3d4b94ea679e9722c3f192f0005
treef87bdafbbe76c032b7d56a4612d63d3c89167e1a
parent19f4a5157ffa03ccd2ea01d68c6962fb771778e7
blkcg: rename blkcg->cgwb_refcnt to ->online_pin and always use it

blkcg->cgwb_refcnt is used to delay blkcg offlining so that blkgs
don't get offlined while there are active cgwbs on them.  However, it
ends up making offlining unordered sometimes causing parents to be
offlined before children.

To fix it, we want child blkcgs to pin the parents' online states
turning the refcnt into a more generic online pinning mechanism.

In prepartion,

* blkcg->cgwb_refcnt -> blkcg->online_pin
* blkcg_cgwb_get/put() -> blkcg_pin/unpin_online()
* Take them out of CONFIG_CGROUP_WRITEBACK

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-cgroup.c
include/linux/blk-cgroup.h
mm/backing-dev.c