• Home
  • Raw
  • Download

Lines Matching refs:work

75 			      struct crush_work_bucket *work,  in bucket_perm_choose()  argument
82 if (work->perm_x != (__u32)x || work->perm_n == 0) { in bucket_perm_choose()
84 work->perm_x = x; in bucket_perm_choose()
90 work->perm[0] = s; in bucket_perm_choose()
91 work->perm_n = 0xffff; /* magic value, see below */ in bucket_perm_choose()
96 work->perm[i] = i; in bucket_perm_choose()
97 work->perm_n = 0; in bucket_perm_choose()
98 } else if (work->perm_n == 0xffff) { in bucket_perm_choose()
101 work->perm[i] = i; in bucket_perm_choose()
102 work->perm[work->perm[0]] = 0; in bucket_perm_choose()
103 work->perm_n = 1; in bucket_perm_choose()
107 for (i = 0; i < work->perm_n; i++) in bucket_perm_choose()
108 dprintk(" perm_choose have %d: %d\n", i, work->perm[i]); in bucket_perm_choose()
109 while (work->perm_n <= pr) { in bucket_perm_choose()
110 unsigned int p = work->perm_n; in bucket_perm_choose()
116 unsigned int t = work->perm[p + i]; in bucket_perm_choose()
117 work->perm[p + i] = work->perm[p]; in bucket_perm_choose()
118 work->perm[p] = t; in bucket_perm_choose()
122 work->perm_n++; in bucket_perm_choose()
125 dprintk(" perm_choose %d: %d\n", i, work->perm[i]); in bucket_perm_choose()
127 s = work->perm[pr]; in bucket_perm_choose()
136 struct crush_work_bucket *work, int x, int r) in bucket_uniform_choose() argument
138 return bucket_perm_choose(&bucket->h, work, x, r); in bucket_uniform_choose()
377 struct crush_work_bucket *work, in crush_bucket_choose() argument
388 work, x, r); in crush_bucket_choose()
450 struct crush_work *work, in crush_choose_firstn() argument
510 in, work->work[-1-in->id], in crush_choose_firstn()
514 in, work->work[-1-in->id], in crush_choose_firstn()
563 work, in crush_choose_firstn()
644 struct crush_work *work, in crush_choose_indep() argument
725 in, work->work[-1-in->id], in crush_choose_indep()
777 work, in crush_choose_indep()
862 w->work = v; in crush_init_workspace()
868 w->work[b] = v; in crush_init_workspace()
874 w->work[b]->perm_x = 0; in crush_init_workspace()
875 w->work[b]->perm_n = 0; in crush_init_workspace()
876 w->work[b]->perm = v; in crush_init_workspace()