Lines Matching defs:jobs
80 * We maintain four lists of jobs:
82 * i) jobs waiting for pages
83 * ii) jobs that have pages, and are waiting for the io to be issued.
84 * iii) jobs that don't need to do any IO and just run a callback
85 * iv) jobs that have completed.
417 static struct kcopyd_job *pop_io_job(struct list_head *jobs,
423 * For I/O jobs, pop any read, any write without sequential write
426 list_for_each_entry(job, jobs, list) {
443 static struct kcopyd_job *pop(struct list_head *jobs,
450 if (!list_empty(jobs)) {
451 if (jobs == &kc->io_jobs)
452 job = pop_io_job(jobs, kc);
454 job = list_entry(jobs->next, struct kcopyd_job, list);
463 static void push(struct list_head *jobs, struct kcopyd_job *job)
469 list_add_tail(&job->list, jobs);
474 static void push_head(struct list_head *jobs, struct kcopyd_job *job)
479 list_add(&job->list, jobs);
503 * If this is the master job, the sub jobs have already
609 * of successful jobs.
611 static int process_jobs(struct list_head *jobs, struct dm_kcopyd_client *kc,
617 while ((job = pop(jobs, kc))) {
637 push_head(jobs, job);
658 * complete jobs can free some pages for pages jobs.
659 * Pages jobs when successful will jump onto the io jobs
660 * list. io jobs call wake when they complete and it all
677 * jobs.
763 * Create some sub jobs to share the work between them.
786 * Allocate an array of jobs consisting of one master job
787 * followed by SPLIT_COUNT sub jobs.
978 /* Wait for completion of all jobs submitted by this client. */