diff options
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 11f5b92d9a47..e15f731d2cdd 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -303,6 +303,20 @@ struct blkcg_gq *__blkg_lookup(struct blkcg *blkcg, struct request_queue *q, | |||
303 | (p_blkg)->q, false))) | 303 | (p_blkg)->q, false))) |
304 | 304 | ||
305 | /** | 305 | /** |
306 | * blkg_for_each_descendant_post - post-order walk of a blkg's descendants | ||
307 | * @d_blkg: loop cursor pointing to the current descendant | ||
308 | * @pos_cgrp: used for iteration | ||
309 | * @p_blkg: target blkg to walk descendants of | ||
310 | * | ||
311 | * Similar to blkg_for_each_descendant_pre() but performs post-order | ||
312 | * traversal instead. Synchronization rules are the same. | ||
313 | */ | ||
314 | #define blkg_for_each_descendant_post(d_blkg, pos_cgrp, p_blkg) \ | ||
315 | cgroup_for_each_descendant_post((pos_cgrp), (p_blkg)->blkcg->css.cgroup) \ | ||
316 | if (((d_blkg) = __blkg_lookup(cgroup_to_blkcg(pos_cgrp), \ | ||
317 | (p_blkg)->q, false))) | ||
318 | |||
319 | /** | ||
306 | * blk_get_rl - get request_list to use | 320 | * blk_get_rl - get request_list to use |
307 | * @q: request_queue of interest | 321 | * @q: request_queue of interest |
308 | * @bio: bio which will be attached to the allocated request (may be %NULL) | 322 | * @bio: bio which will be attached to the allocated request (may be %NULL) |