Lines Matching refs:bdi

93 				&wb->bdi->tot_write_bandwidth);
104 &wb->bdi->tot_write_bandwidth) < 0);
200 * Wait for one or more work items issued to @bdi with their ->done field
252 struct backing_dev_info *bdi = inode_to_bdi(inode);
260 wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC);
264 wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC);
270 wb = &bdi->wb;
342 static void bdi_down_write_wb_switch_rwsem(struct backing_dev_info *bdi)
344 down_write(&bdi->wb_switch_rwsem);
347 static void bdi_up_write_wb_switch_rwsem(struct backing_dev_info *bdi)
349 up_write(&bdi->wb_switch_rwsem);
357 struct backing_dev_info *bdi = inode_to_bdi(inode);
369 down_read(&bdi->wb_switch_rwsem);
458 up_read(&bdi->wb_switch_rwsem);
492 struct backing_dev_info *bdi = inode_to_bdi(inode);
519 isw->new_wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC);
810 * @nr_pages: number of pages to write for the whole bdi
814 * @wb->bdi.
819 unsigned long tot_bw = atomic_long_read(&wb->bdi->tot_write_bandwidth);
836 * bdi_split_work_to_wbs - split a wb_writeback_work to all wb's of a bdi
837 * @bdi: target backing_dev_info
841 * Split and issue @base_work to all wb's (bdi_writeback's) of @bdi which
844 * total active write bandwidth of @bdi.
846 static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
851 struct bdi_writeback *wb = list_entry(&bdi->wb_list,
857 list_for_each_entry_continue_rcu(wb, &bdi->wb_list, bdi_node) {
858 DEFINE_WB_COMPLETION(fallback_work_done, bdi);
890 * Pin @wb so that it stays on @bdi->wb_list. This allows
918 * cgroup_writeback_by_id - initiate cgroup writeback from bdi and memcg IDs
919 * @bdi_id: target bdi id
931 struct backing_dev_info *bdi;
937 /* lookup bdi and memcg */
938 bdi = bdi_get_by_id(bdi_id);
939 if (!bdi)
956 wb = wb_get_lookup(bdi, memcg_css);
996 bdi_put(bdi);
1033 static void bdi_down_write_wb_switch_rwsem(struct backing_dev_info *bdi) { }
1034 static void bdi_up_write_wb_switch_rwsem(struct backing_dev_info *bdi) { }
1062 static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
1068 if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) {
1070 wb_queue_work(&bdi->wb, base_work);
1210 * requeue inode for re-scanning after bdi->b_io list is exhausted.
1235 * from permanently stopping the whole bdi writeback.
2073 * Handle writeback of dirty data for the device backed by this bdi. Also
2082 set_worker_desc("flush-%s", bdi_dev_name(wb->bdi));
2117 * Start writeback of `nr_pages' pages on this bdi. If `nr_pages' is zero,
2120 static void __wakeup_flusher_threads_bdi(struct backing_dev_info *bdi,
2125 if (!bdi_has_dirty_io(bdi))
2128 list_for_each_entry_rcu(wb, &bdi->wb_list, bdi_node)
2132 void wakeup_flusher_threads_bdi(struct backing_dev_info *bdi,
2136 __wakeup_flusher_threads_bdi(bdi, reason);
2145 struct backing_dev_info *bdi;
2154 list_for_each_entry_rcu(bdi, &bdi_list, bdi_list)
2155 __wakeup_flusher_threads_bdi(bdi, reason);
2160 * Wake up bdi's periodically to make sure dirtytime inodes gets
2179 struct backing_dev_info *bdi;
2182 list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) {
2185 list_for_each_entry_rcu(wb, &bdi->wb_list, bdi_node)
2329 * If this is the first dirty inode for this bdi,
2330 * we have to wake-up the corresponding bdi thread
2335 (wb->bdi->capabilities & BDI_CAP_WRITEBACK))
2442 struct backing_dev_info *bdi = sb->s_bdi;
2443 DEFINE_WB_COMPLETION(done, bdi);
2453 if (!bdi_has_dirty_io(bdi) || bdi == &noop_backing_dev_info)
2520 struct backing_dev_info *bdi = sb->s_bdi;
2521 DEFINE_WB_COMPLETION(done, bdi);
2537 if (bdi == &noop_backing_dev_info)
2542 bdi_down_write_wb_switch_rwsem(bdi);
2543 bdi_split_work_to_wbs(bdi, &work, false);
2545 bdi_up_write_wb_switch_rwsem(bdi);