Lines Matching defs:goal
343 * ocfs2_find_resv_lhs() - find the window which contains goal
345 * @goal: which bit to search for
347 * If a window containing that goal is not found, we return the window
348 * which comes before goal. Returns NULL on empty rbtree or no window
349 * before goal.
352 ocfs2_find_resv_lhs(struct ocfs2_reservation_map *resmap, unsigned int goal)
367 if (resv->r_start <= goal && ocfs2_resv_end(resv) >= goal)
370 /* Check if we overshot the reservation just before goal? */
371 if (resv->r_start > goal) {
457 unsigned int goal, unsigned int wanted)
475 goal, wanted, RB_EMPTY_ROOT(root));
484 clen = ocfs2_resmap_find_free_bits(resmap, wanted, goal,
485 resmap->m_bitmap_len - goal,
492 BUG_ON(goal == 0 && clen == 0);
504 prev_resv = ocfs2_find_resv_lhs(resmap, goal);
509 * find a window that starts before goal.
511 * However, we can take the first window after goal,
514 * gap between goal and the LHS window, then the
530 if (next_resv->r_start <= goal) {
531 mlog(ML_ERROR, "goal: %u next_resv: start %u len %u\n",
532 goal, next_resv->r_start, next_resv->r_len);
537 clen = ocfs2_resmap_find_free_bits(resmap, wanted, goal,
538 next_resv->r_start - goal,
680 unsigned int goal = 0;
687 * start goal makes sense.
690 goal = resv->r_last_start + resv->r_last_len;
691 if (goal >= resmap->m_bitmap_len)
692 goal = 0;
695 __ocfs2_resv_find_window(resmap, resv, goal, wanted);
698 if (ocfs2_resv_empty(resv) && goal != 0)