Lines Matching refs:bdi
93 &wb->bdi->tot_write_bandwidth);
104 &wb->bdi->tot_write_bandwidth) < 0);
183 * Wait for one or more work items issued to @bdi with their ->done field
242 struct backing_dev_info *bdi = inode_to_bdi(inode);
250 wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC);
254 wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC);
260 wb = &bdi->wb;
287 if (wb != &wb->bdi->wb)
362 static void bdi_down_write_wb_switch_rwsem(struct backing_dev_info *bdi)
364 down_write(&bdi->wb_switch_rwsem);
367 static void bdi_up_write_wb_switch_rwsem(struct backing_dev_info *bdi)
369 up_write(&bdi->wb_switch_rwsem);
470 struct backing_dev_info *bdi = inode_to_bdi(isw->inodes[0]);
480 down_read(&bdi->wb_switch_rwsem);
509 up_read(&bdi->wb_switch_rwsem);
562 struct backing_dev_info *bdi = inode_to_bdi(inode);
589 isw->new_wb = wb_get_create(bdi, memcg_css, GFP_ATOMIC);
658 isw->new_wb = wb_get_create(wb->bdi, memcg_css, GFP_KERNEL);
663 isw->new_wb = &wb->bdi->wb; /* wb_get() is noop for bdi's wb */
921 * @nr_pages: number of pages to write for the whole bdi
925 * @wb->bdi.
930 unsigned long tot_bw = atomic_long_read(&wb->bdi->tot_write_bandwidth);
947 * bdi_split_work_to_wbs - split a wb_writeback_work to all wb's of a bdi
948 * @bdi: target backing_dev_info
952 * Split and issue @base_work to all wb's (bdi_writeback's) of @bdi which
955 * total active write bandwidth of @bdi.
957 static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
962 struct bdi_writeback *wb = list_entry(&bdi->wb_list,
968 list_for_each_entry_continue_rcu(wb, &bdi->wb_list, bdi_node) {
969 DEFINE_WB_COMPLETION(fallback_work_done, bdi);
1001 * Pin @wb so that it stays on @bdi->wb_list. This allows
1029 * cgroup_writeback_by_id - initiate cgroup writeback from bdi and memcg IDs
1030 * @bdi_id: target bdi id
1041 struct backing_dev_info *bdi;
1048 /* lookup bdi and memcg */
1049 bdi = bdi_get_by_id(bdi_id);
1050 if (!bdi)
1067 wb = wb_get_lookup(bdi, memcg_css);
1105 bdi_put(bdi);
1148 static void bdi_down_write_wb_switch_rwsem(struct backing_dev_info *bdi) { }
1149 static void bdi_up_write_wb_switch_rwsem(struct backing_dev_info *bdi) { }
1189 static void bdi_split_work_to_wbs(struct backing_dev_info *bdi,
1195 if (!skip_if_busy || !writeback_in_progress(&bdi->wb)) {
1197 wb_queue_work(&bdi->wb, base_work);
1351 * requeue inode for re-scanning after bdi->b_io list is exhausted.
1376 * from permanently stopping the whole bdi writeback.
2259 * Handle writeback of dirty data for the device backed by this bdi. Also
2268 set_worker_desc("flush-%s", bdi_dev_name(wb->bdi));
2300 * Start writeback of `nr_pages' pages on this bdi. If `nr_pages' is zero,
2303 static void __wakeup_flusher_threads_bdi(struct backing_dev_info *bdi,
2308 if (!bdi_has_dirty_io(bdi))
2311 list_for_each_entry_rcu(wb, &bdi->wb_list, bdi_node)
2315 void wakeup_flusher_threads_bdi(struct backing_dev_info *bdi,
2319 __wakeup_flusher_threads_bdi(bdi, reason);
2328 struct backing_dev_info *bdi;
2336 list_for_each_entry_rcu(bdi, &bdi_list, bdi_list)
2337 __wakeup_flusher_threads_bdi(bdi, reason);
2342 * Wake up bdi's periodically to make sure dirtytime inodes gets
2361 struct backing_dev_info *bdi;
2364 list_for_each_entry_rcu(bdi, &bdi_list, bdi_list) {
2367 list_for_each_entry_rcu(wb, &bdi->wb_list, bdi_node)
2541 * If this is the first dirty inode for this bdi,
2542 * we have to wake-up the corresponding bdi thread
2547 (wb->bdi->capabilities & BDI_CAP_WRITEBACK))
2656 struct backing_dev_info *bdi = sb->s_bdi;
2657 DEFINE_WB_COMPLETION(done, bdi);
2667 if (!bdi_has_dirty_io(bdi) || bdi == &noop_backing_dev_info)
2734 struct backing_dev_info *bdi = sb->s_bdi;
2735 DEFINE_WB_COMPLETION(done, bdi);
2751 if (bdi == &noop_backing_dev_info)
2756 bdi_down_write_wb_switch_rwsem(bdi);
2757 bdi_split_work_to_wbs(bdi, &work, false);
2759 bdi_up_write_wb_switch_rwsem(bdi);