Lines Matching defs:jobs
77 * We maintain four lists of jobs:
79 * i) jobs waiting for pages
80 * ii) jobs that have pages, and are waiting for the io to be issued.
81 * iii) jobs that don't need to do any IO and just run a callback
82 * iv) jobs that have completed.
411 static struct kcopyd_job *pop_io_job(struct list_head *jobs,
417 * For I/O jobs, pop any read, any write without sequential write
420 list_for_each_entry(job, jobs, list) {
436 static struct kcopyd_job *pop(struct list_head *jobs,
444 if (!list_empty(jobs)) {
445 if (jobs == &kc->io_jobs)
446 job = pop_io_job(jobs, kc);
448 job = list_entry(jobs->next, struct kcopyd_job, list);
457 static void push(struct list_head *jobs, struct kcopyd_job *job)
463 list_add_tail(&job->list, jobs);
468 static void push_head(struct list_head *jobs, struct kcopyd_job *job)
474 list_add(&job->list, jobs);
498 * If this is the master job, the sub jobs have already
605 * of successful jobs.
607 static int process_jobs(struct list_head *jobs, struct dm_kcopyd_client *kc,
613 while ((job = pop(jobs, kc))) {
633 push_head(jobs, job);
655 * complete jobs can free some pages for pages jobs.
656 * Pages jobs when successful will jump onto the io jobs
657 * list. io jobs call wake when they complete and it all
674 * jobs.
759 * Create some sub jobs to share the work between them.
782 * Allocate an array of jobs consisting of one master job
783 * followed by SPLIT_COUNT sub jobs.
972 /* Wait for completion of all jobs submitted by this client. */