• Home
  • Raw
  • Download

Lines Matching full:wb

41 void wb_start_background_writeback(struct bdi_writeback *wb);
43 void wb_wakeup_delayed(struct bdi_writeback *wb);
53 static inline bool wb_has_dirty_io(struct bdi_writeback *wb) in wb_has_dirty_io() argument
55 return test_bit(WB_has_dirty_io, &wb->state); in wb_has_dirty_io()
67 static inline void __add_wb_stat(struct bdi_writeback *wb, in __add_wb_stat() argument
70 percpu_counter_add_batch(&wb->stat[item], amount, WB_STAT_BATCH); in __add_wb_stat()
73 static inline void inc_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) in inc_wb_stat() argument
75 __add_wb_stat(wb, item, 1); in inc_wb_stat()
78 static inline void dec_wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) in dec_wb_stat() argument
80 __add_wb_stat(wb, item, -1); in dec_wb_stat()
83 static inline s64 wb_stat(struct bdi_writeback *wb, enum wb_stat_item item) in wb_stat() argument
85 return percpu_counter_read_positive(&wb->stat[item]); in wb_stat()
88 static inline s64 wb_stat_sum(struct bdi_writeback *wb, enum wb_stat_item item) in wb_stat_sum() argument
90 return percpu_counter_sum_positive(&wb->stat[item]); in wb_stat_sum()
93 extern void wb_writeout_inc(struct bdi_writeback *wb);
126 * @wb: bdi_writeback of interest
131 static inline bool writeback_in_progress(struct bdi_writeback *wb) in writeback_in_progress() argument
133 return test_bit(WB_writeback_running, &wb->state); in writeback_in_progress()
151 static inline int wb_congested(struct bdi_writeback *wb, int cong_bits) in wb_congested() argument
153 return wb->congested & cong_bits; in wb_congested()
203 * wb_find_current - find wb for %current on a bdi
206 * Find the wb of @bdi which matches both the memcg and blkcg of %current.
207 * Must be called under rcu_read_lock() which protects the returend wb.
213 struct bdi_writeback *wb; in wb_find_current() local
217 return &bdi->wb; in wb_find_current()
219 wb = radix_tree_lookup(&bdi->cgwb_tree, memcg_css->id); in wb_find_current()
225 if (likely(wb && wb->blkcg_css == task_css(current, io_cgrp_id))) in wb_find_current()
226 return wb; in wb_find_current()
231 * wb_get_create_current - get or create wb for %current on a bdi
242 struct bdi_writeback *wb; in wb_get_create_current() local
245 wb = wb_find_current(bdi); in wb_get_create_current()
246 if (wb && unlikely(!wb_tryget(wb))) in wb_get_create_current()
247 wb = NULL; in wb_get_create_current()
250 if (unlikely(!wb)) { in wb_get_create_current()
254 wb = wb_get_create(bdi, memcg_css, gfp); in wb_get_create_current()
257 return wb; in wb_get_create_current()
261 * inode_to_wb_is_valid - test whether an inode has a wb associated
264 * Returns %true if @inode has a wb associated. May be called without any
273 * inode_to_wb - determine the wb of an inode
276 * Returns the wb @inode is currently associated with. The caller must be
278 * associated wb's list_lock.
292 * unlocked_inode_to_wb_begin - begin unlocked inode wb access transaction
296 * The caller wants to access the wb associated with @inode but isn't
297 * holding inode->i_lock, the i_pages lock or wb->list_lock. This
298 * function determines the wb associated with @inode and ensures that the
313 * ensures that we see the new wb if we see cleared I_WB_SWITCH. in unlocked_inode_to_wb_begin()
328 * unlocked_inode_to_wb_end - end inode wb access transaction
350 return &bdi->wb; in wb_find_current()
356 return &bdi->wb; in wb_get_create_current()
366 return &inode_to_bdi(inode)->wb; in inode_to_wb()
390 return wb_congested(&inode_to_bdi(inode)->wb, cong_bits); in inode_congested()
413 return wb_congested(&bdi->wb, cong_bits); in bdi_congested()