• Home
  • Raw
  • Download

Lines Matching refs:work

144 				  struct wb_writeback_work *work)  in finish_writeback_work()  argument
146 struct wb_completion *done = work->done; in finish_writeback_work()
148 if (work->auto_free) in finish_writeback_work()
149 kfree(work); in finish_writeback_work()
160 struct wb_writeback_work *work) in wb_queue_work() argument
162 trace_writeback_queue(wb, work); in wb_queue_work()
164 if (work->done) in wb_queue_work()
165 atomic_inc(&work->done->cnt); in wb_queue_work()
170 list_add_tail(&work->list, &wb->work_list); in wb_queue_work()
173 finish_writeback_work(wb, work); in wb_queue_work()
346 struct rcu_work work; member
464 static void inode_switch_wbs_work_fn(struct work_struct *work) in inode_switch_wbs_work_fn() argument
467 container_of(to_rcu_work(work), struct inode_switch_wbs_context, work); in inode_switch_wbs_work_fn()
603 INIT_RCU_WORK(&isw->work, inode_switch_wbs_work_fn); in inode_switch_wbs()
604 queue_rcu_work(isw_wq, &isw->work); in inode_switch_wbs()
692 INIT_RCU_WORK(&isw->work, inode_switch_wbs_work_fn); in cleanup_offline_cgwb()
693 queue_rcu_work(isw_wq, &isw->work); in cleanup_offline_cgwb()
967 struct wb_writeback_work *work; in bdi_split_work_to_wbs() local
985 work = kmalloc(sizeof(*work), GFP_ATOMIC); in bdi_split_work_to_wbs()
986 if (work) { in bdi_split_work_to_wbs()
987 *work = *base_work; in bdi_split_work_to_wbs()
988 work->nr_pages = nr_pages; in bdi_split_work_to_wbs()
989 work->auto_free = 1; in bdi_split_work_to_wbs()
990 wb_queue_work(wb, work); in bdi_split_work_to_wbs()
1005 work = &fallback_work; in bdi_split_work_to_wbs()
1006 *work = *base_work; in bdi_split_work_to_wbs()
1007 work->nr_pages = nr_pages; in bdi_split_work_to_wbs()
1008 work->auto_free = 0; in bdi_split_work_to_wbs()
1009 work->done = &fallback_work_done; in bdi_split_work_to_wbs()
1011 wb_queue_work(wb, work); in bdi_split_work_to_wbs()
1040 struct wb_writeback_work *work; in cgroup_writeback_by_id() local
1083 work = kzalloc(sizeof(*work), GFP_NOWAIT | __GFP_NOWARN); in cgroup_writeback_by_id()
1084 if (work) { in cgroup_writeback_by_id()
1085 work->nr_pages = dirty; in cgroup_writeback_by_id()
1086 work->sync_mode = WB_SYNC_NONE; in cgroup_writeback_by_id()
1087 work->range_cyclic = 1; in cgroup_writeback_by_id()
1088 work->reason = reason; in cgroup_writeback_by_id()
1089 work->done = done; in cgroup_writeback_by_id()
1090 work->auto_free = 1; in cgroup_writeback_by_id()
1091 wb_queue_work(wb, work); in cgroup_writeback_by_id()
1436 static void queue_io(struct bdi_writeback *wb, struct wb_writeback_work *work, in queue_io() argument
1445 if (!work->for_sync) in queue_io()
1451 trace_writeback_queue_io(wb, work, dirtied_before, moved); in queue_io()
1771 struct wb_writeback_work *work) in writeback_chunk_size() argument
1788 if (work->sync_mode == WB_SYNC_ALL || work->tagged_writepages) in writeback_chunk_size()
1793 pages = min(pages, work->nr_pages); in writeback_chunk_size()
1812 struct wb_writeback_work *work) in writeback_sb_inodes() argument
1815 .sync_mode = work->sync_mode, in writeback_sb_inodes()
1816 .tagged_writepages = work->tagged_writepages, in writeback_sb_inodes()
1817 .for_kupdate = work->for_kupdate, in writeback_sb_inodes()
1818 .for_background = work->for_background, in writeback_sb_inodes()
1819 .for_sync = work->for_sync, in writeback_sb_inodes()
1820 .range_cyclic = work->range_cyclic, in writeback_sb_inodes()
1834 if (work->sb) { in writeback_sb_inodes()
1895 write_chunk = writeback_chunk_size(wb, work); in writeback_sb_inodes()
1906 work->nr_pages -= write_chunk - wbc.nr_to_write; in writeback_sb_inodes()
1948 if (work->nr_pages <= 0) in writeback_sb_inodes()
1956 struct wb_writeback_work *work) in __writeback_inodes_wb() argument
1974 wrote += writeback_sb_inodes(sb, wb, work); in __writeback_inodes_wb()
1981 if (work->nr_pages <= 0) in __writeback_inodes_wb()
1992 struct wb_writeback_work work = { in writeback_inodes_wb() local
2003 queue_io(wb, &work, jiffies); in writeback_inodes_wb()
2004 __writeback_inodes_wb(wb, &work); in writeback_inodes_wb()
2008 return nr_pages - work.nr_pages; in writeback_inodes_wb()
2027 struct wb_writeback_work *work) in wb_writeback() argument
2029 long nr_pages = work->nr_pages; in wb_writeback()
2041 if (work->nr_pages <= 0) in wb_writeback()
2050 if ((work->for_background || work->for_kupdate) && in wb_writeback()
2058 if (work->for_background && !wb_over_bg_thresh(wb)) in wb_writeback()
2067 if (work->for_kupdate) { in wb_writeback()
2070 } else if (work->for_background) in wb_writeback()
2073 trace_writeback_start(wb, work); in wb_writeback()
2075 queue_io(wb, work, dirtied_before); in wb_writeback()
2076 if (work->sb) in wb_writeback()
2077 progress = writeback_sb_inodes(work->sb, wb, work); in wb_writeback()
2079 progress = __writeback_inodes_wb(wb, work); in wb_writeback()
2080 trace_writeback_written(wb, work); in wb_writeback()
2102 trace_writeback_wait(wb, work); in wb_writeback()
2113 return nr_pages - work->nr_pages; in wb_writeback()
2121 struct wb_writeback_work *work = NULL; in get_next_work_item() local
2125 work = list_entry(wb->work_list.next, in get_next_work_item()
2127 list_del_init(&work->list); in get_next_work_item()
2130 return work; in get_next_work_item()
2137 struct wb_writeback_work work = { in wb_check_background_flush() local
2145 return wb_writeback(wb, &work); in wb_check_background_flush()
2171 struct wb_writeback_work work = { in wb_check_old_data_flush() local
2179 return wb_writeback(wb, &work); in wb_check_old_data_flush()
2194 struct wb_writeback_work work = { in wb_check_start_all() local
2201 nr_pages = wb_writeback(wb, &work); in wb_check_start_all()
2214 struct wb_writeback_work *work; in wb_do_writeback() local
2218 while ((work = get_next_work_item(wb)) != NULL) { in wb_do_writeback()
2219 trace_writeback_exec(wb, work); in wb_do_writeback()
2220 wrote += wb_writeback(wb, work); in wb_do_writeback()
2221 finish_writeback_work(wb, work); in wb_do_writeback()
2243 void wb_workfn(struct work_struct *work) in wb_workfn() argument
2245 struct bdi_writeback *wb = container_of(to_delayed_work(work), in wb_workfn()
2639 struct wb_writeback_work work = { in __writeback_inodes_sb_nr() local
2652 bdi_split_work_to_wbs(sb->s_bdi, &work, skip_if_busy); in __writeback_inodes_sb_nr()
2717 struct wb_writeback_work work = { in sync_inodes_sb() local
2738 bdi_split_work_to_wbs(bdi, &work, false); in sync_inodes_sb()