• Home
  • Raw
  • Download

Lines Matching refs:work

67 static void normal_work_helper(struct btrfs_work *work);
72 struct btrfs_work *work = container_of(arg, struct btrfs_work, \
74 normal_work_helper(work); \
84 btrfs_work_owner(struct btrfs_work *work) in btrfs_work_owner() argument
86 return work->wq->fs_info; in btrfs_work_owner()
271 struct btrfs_work *work; in run_ordered_work() local
281 work = list_entry(list->next, struct btrfs_work, in run_ordered_work()
283 if (!test_bit(WORK_DONE_BIT, &work->flags)) in run_ordered_work()
292 if (test_and_set_bit(WORK_ORDER_DONE_BIT, &work->flags)) in run_ordered_work()
294 trace_btrfs_ordered_sched(work); in run_ordered_work()
296 work->ordered_func(work); in run_ordered_work()
300 list_del(&work->ordered_list); in run_ordered_work()
308 wtag = work; in run_ordered_work()
309 work->ordered_free(work); in run_ordered_work()
315 static void normal_work_helper(struct btrfs_work *work) in normal_work_helper() argument
329 if (work->ordered_func) in normal_work_helper()
331 wq = work->wq; in normal_work_helper()
333 wtag = work; in normal_work_helper()
335 trace_btrfs_work_sched(work); in normal_work_helper()
337 work->func(work); in normal_work_helper()
339 set_bit(WORK_DONE_BIT, &work->flags); in normal_work_helper()
346 void btrfs_init_work(struct btrfs_work *work, btrfs_work_func_t uniq_func, in btrfs_init_work() argument
351 work->func = func; in btrfs_init_work()
352 work->ordered_func = ordered_func; in btrfs_init_work()
353 work->ordered_free = ordered_free; in btrfs_init_work()
354 INIT_WORK(&work->normal_work, uniq_func); in btrfs_init_work()
355 INIT_LIST_HEAD(&work->ordered_list); in btrfs_init_work()
356 work->flags = 0; in btrfs_init_work()
360 struct btrfs_work *work) in __btrfs_queue_work() argument
364 work->wq = wq; in __btrfs_queue_work()
366 if (work->ordered_func) { in __btrfs_queue_work()
368 list_add_tail(&work->ordered_list, &wq->ordered_list); in __btrfs_queue_work()
371 trace_btrfs_work_queued(work); in __btrfs_queue_work()
372 queue_work(wq->normal_wq, &work->normal_work); in __btrfs_queue_work()
376 struct btrfs_work *work) in btrfs_queue_work() argument
380 if (test_bit(WORK_HIGH_PRIO_BIT, &work->flags) && wq->high) in btrfs_queue_work()
384 __btrfs_queue_work(dest_wq, work); in btrfs_queue_work()
414 void btrfs_set_work_high_priority(struct btrfs_work *work) in btrfs_set_work_high_priority() argument
416 set_bit(WORK_HIGH_PRIO_BIT, &work->flags); in btrfs_set_work_high_priority()