Lines Matching full:wb
84 * Each wb (bdi_writeback) can perform writeback operations, is measured
86 * (bdi_writeback) is served by its embedded bdi->wb.
90 * memcg - blkcg combination can be served by its own wb by assigning a
91 * dedicated wb to each memcg, which enables isolation across different
95 * A cgroup wb is indexed on its bdi by the ID of the associated memcg,
98 * change as blkcg is disabled and enabled higher up in the hierarchy, a wb
100 * that a new wb for the combination can be created.
147 struct percpu_ref refcnt; /* used only for !root wb's */
186 struct bdi_writeback wb; /* the root writeback info for this bdi */ member
190 struct mutex cgwb_release_mutex; /* protect shutdown of wb structs */
214 * wb_tryget - try to increment a wb's refcount
215 * @wb: bdi_writeback to get
217 static inline bool wb_tryget(struct bdi_writeback *wb) in wb_tryget() argument
219 if (wb != &wb->bdi->wb) in wb_tryget()
220 return percpu_ref_tryget(&wb->refcnt); in wb_tryget()
225 * wb_get - increment a wb's refcount
226 * @wb: bdi_writeback to get
228 static inline void wb_get(struct bdi_writeback *wb) in wb_get() argument
230 if (wb != &wb->bdi->wb) in wb_get()
231 percpu_ref_get(&wb->refcnt); in wb_get()
235 * wb_put - decrement a wb's refcount
236 * @wb: bdi_writeback to put
239 static inline void wb_put_many(struct bdi_writeback *wb, unsigned long nr) in wb_put_many() argument
241 if (WARN_ON_ONCE(!wb->bdi)) { in wb_put_many()
249 if (wb != &wb->bdi->wb) in wb_put_many()
250 percpu_ref_put_many(&wb->refcnt, nr); in wb_put_many()
254 * wb_put - decrement a wb's refcount
255 * @wb: bdi_writeback to put
257 static inline void wb_put(struct bdi_writeback *wb) in wb_put() argument
259 wb_put_many(wb, 1); in wb_put()
263 * wb_dying - is a wb dying?
264 * @wb: bdi_writeback of interest
266 * Returns whether @wb is unlinked and being drained.
268 static inline bool wb_dying(struct bdi_writeback *wb) in wb_dying() argument
270 return percpu_ref_is_dying(&wb->refcnt); in wb_dying()
275 static inline bool wb_tryget(struct bdi_writeback *wb) in wb_tryget() argument
280 static inline void wb_get(struct bdi_writeback *wb) in wb_get() argument
284 static inline void wb_put(struct bdi_writeback *wb) in wb_put() argument
288 static inline void wb_put_many(struct bdi_writeback *wb, unsigned long nr) in wb_put_many() argument
292 static inline bool wb_dying(struct bdi_writeback *wb) in wb_dying() argument