Lines Matching refs:work

143 				  struct wb_writeback_work *work)  in finish_writeback_work()  argument
145 struct wb_completion *done = work->done; in finish_writeback_work()
147 if (work->auto_free) in finish_writeback_work()
148 kfree(work); in finish_writeback_work()
159 struct wb_writeback_work *work) in wb_queue_work() argument
161 trace_writeback_queue(wb, work); in wb_queue_work()
163 if (work->done) in wb_queue_work()
164 atomic_inc(&work->done->cnt); in wb_queue_work()
169 list_add_tail(&work->list, &wb->work_list); in wb_queue_work()
172 finish_writeback_work(wb, work); in wb_queue_work()
345 struct rcu_work work; member
461 static void inode_switch_wbs_work_fn(struct work_struct *work) in inode_switch_wbs_work_fn() argument
464 container_of(to_rcu_work(work), struct inode_switch_wbs_context, work); in inode_switch_wbs_work_fn()
600 INIT_RCU_WORK(&isw->work, inode_switch_wbs_work_fn); in inode_switch_wbs()
601 queue_rcu_work(isw_wq, &isw->work); in inode_switch_wbs()
672 INIT_RCU_WORK(&isw->work, inode_switch_wbs_work_fn); in cleanup_offline_cgwb()
673 queue_rcu_work(isw_wq, &isw->work); in cleanup_offline_cgwb()
984 struct wb_writeback_work *work; in bdi_split_work_to_wbs() local
1002 work = kmalloc(sizeof(*work), GFP_ATOMIC); in bdi_split_work_to_wbs()
1003 if (work) { in bdi_split_work_to_wbs()
1004 *work = *base_work; in bdi_split_work_to_wbs()
1005 work->nr_pages = nr_pages; in bdi_split_work_to_wbs()
1006 work->auto_free = 1; in bdi_split_work_to_wbs()
1007 wb_queue_work(wb, work); in bdi_split_work_to_wbs()
1012 work = &fallback_work; in bdi_split_work_to_wbs()
1013 *work = *base_work; in bdi_split_work_to_wbs()
1014 work->nr_pages = nr_pages; in bdi_split_work_to_wbs()
1015 work->auto_free = 0; in bdi_split_work_to_wbs()
1016 work->done = &fallback_work_done; in bdi_split_work_to_wbs()
1018 wb_queue_work(wb, work); in bdi_split_work_to_wbs()
1054 struct wb_writeback_work *work; in cgroup_writeback_by_id() local
1097 work = kzalloc(sizeof(*work), GFP_NOWAIT | __GFP_NOWARN); in cgroup_writeback_by_id()
1098 if (work) { in cgroup_writeback_by_id()
1099 work->nr_pages = dirty; in cgroup_writeback_by_id()
1100 work->sync_mode = WB_SYNC_NONE; in cgroup_writeback_by_id()
1101 work->range_cyclic = 1; in cgroup_writeback_by_id()
1102 work->reason = reason; in cgroup_writeback_by_id()
1103 work->done = done; in cgroup_writeback_by_id()
1104 work->auto_free = 1; in cgroup_writeback_by_id()
1105 wb_queue_work(wb, work); in cgroup_writeback_by_id()
1445 static void queue_io(struct bdi_writeback *wb, struct wb_writeback_work *work, in queue_io() argument
1454 if (!work->for_sync) in queue_io()
1460 trace_writeback_queue_io(wb, work, dirtied_before, moved); in queue_io()
1750 struct wb_writeback_work *work) in writeback_chunk_size() argument
1767 if (work->sync_mode == WB_SYNC_ALL || work->tagged_writepages) in writeback_chunk_size()
1772 pages = min(pages, work->nr_pages); in writeback_chunk_size()
1791 struct wb_writeback_work *work) in writeback_sb_inodes() argument
1794 .sync_mode = work->sync_mode, in writeback_sb_inodes()
1795 .tagged_writepages = work->tagged_writepages, in writeback_sb_inodes()
1796 .for_kupdate = work->for_kupdate, in writeback_sb_inodes()
1797 .for_background = work->for_background, in writeback_sb_inodes()
1798 .for_sync = work->for_sync, in writeback_sb_inodes()
1799 .range_cyclic = work->range_cyclic, in writeback_sb_inodes()
1812 if (work->sb) { in writeback_sb_inodes()
1873 write_chunk = writeback_chunk_size(wb, work); in writeback_sb_inodes()
1884 work->nr_pages -= write_chunk - wbc.nr_to_write; in writeback_sb_inodes()
1925 if (work->nr_pages <= 0) in writeback_sb_inodes()
1933 struct wb_writeback_work *work) in __writeback_inodes_wb() argument
1951 wrote += writeback_sb_inodes(sb, wb, work); in __writeback_inodes_wb()
1958 if (work->nr_pages <= 0) in __writeback_inodes_wb()
1969 struct wb_writeback_work work = { in writeback_inodes_wb() local
1980 queue_io(wb, &work, jiffies); in writeback_inodes_wb()
1981 __writeback_inodes_wb(wb, &work); in writeback_inodes_wb()
1985 return nr_pages - work.nr_pages; in writeback_inodes_wb()
2004 struct wb_writeback_work *work) in wb_writeback() argument
2006 long nr_pages = work->nr_pages; in wb_writeback()
2018 if (work->nr_pages <= 0) in wb_writeback()
2027 if ((work->for_background || work->for_kupdate) && in wb_writeback()
2035 if (work->for_background && !wb_over_bg_thresh(wb)) in wb_writeback()
2044 if (work->for_kupdate) { in wb_writeback()
2047 } else if (work->for_background) in wb_writeback()
2050 trace_writeback_start(wb, work); in wb_writeback()
2052 queue_io(wb, work, dirtied_before); in wb_writeback()
2053 if (work->sb) in wb_writeback()
2054 progress = writeback_sb_inodes(work->sb, wb, work); in wb_writeback()
2056 progress = __writeback_inodes_wb(wb, work); in wb_writeback()
2057 trace_writeback_written(wb, work); in wb_writeback()
2079 trace_writeback_wait(wb, work); in wb_writeback()
2090 return nr_pages - work->nr_pages; in wb_writeback()
2098 struct wb_writeback_work *work = NULL; in get_next_work_item() local
2102 work = list_entry(wb->work_list.next, in get_next_work_item()
2104 list_del_init(&work->list); in get_next_work_item()
2107 return work; in get_next_work_item()
2114 struct wb_writeback_work work = { in wb_check_background_flush() local
2122 return wb_writeback(wb, &work); in wb_check_background_flush()
2148 struct wb_writeback_work work = { in wb_check_old_data_flush() local
2156 return wb_writeback(wb, &work); in wb_check_old_data_flush()
2171 struct wb_writeback_work work = { in wb_check_start_all() local
2178 nr_pages = wb_writeback(wb, &work); in wb_check_start_all()
2191 struct wb_writeback_work *work; in wb_do_writeback() local
2195 while ((work = get_next_work_item(wb)) != NULL) { in wb_do_writeback()
2196 trace_writeback_exec(wb, work); in wb_do_writeback()
2197 wrote += wb_writeback(wb, work); in wb_do_writeback()
2198 finish_writeback_work(wb, work); in wb_do_writeback()
2220 void wb_workfn(struct work_struct *work) in wb_workfn() argument
2222 struct bdi_writeback *wb = container_of(to_delayed_work(work), in wb_workfn()
2599 struct wb_writeback_work work = { in __writeback_inodes_sb_nr() local
2612 bdi_split_work_to_wbs(sb->s_bdi, &work, skip_if_busy); in __writeback_inodes_sb_nr()
2677 struct wb_writeback_work work = { in sync_inodes_sb() local
2698 bdi_split_work_to_wbs(bdi, &work, false); in sync_inodes_sb()