Lines Matching defs:goal
359 * ocfs2_find_resv_lhs() - find the window which contains goal
361 * @goal: which bit to search for
363 * If a window containing that goal is not found, we return the window
364 * which comes before goal. Returns NULL on empty rbtree or no window
365 * before goal.
368 ocfs2_find_resv_lhs(struct ocfs2_reservation_map *resmap, unsigned int goal)
383 if (resv->r_start <= goal && ocfs2_resv_end(resv) >= goal)
386 /* Check if we overshot the reservation just before goal? */
387 if (resv->r_start > goal) {
473 unsigned int goal, unsigned int wanted)
491 mlog(0, "resv start: %u resv end: %u goal: %u wanted: %u\n",
492 resv->r_start, ocfs2_resv_end(resv), goal, wanted);
504 clen = ocfs2_resmap_find_free_bits(resmap, wanted, goal,
505 resmap->m_bitmap_len - goal,
512 BUG_ON(goal == 0 && clen == 0);
524 prev_resv = ocfs2_find_resv_lhs(resmap, goal);
531 * find a window that starts before goal.
533 * However, we can take the first window after goal,
536 * gap between goal and the LHS window, then the
552 if (next_resv->r_start <= goal) {
553 mlog(ML_ERROR, "goal: %u next_resv: start %u len %u\n",
554 goal, next_resv->r_start, next_resv->r_len);
559 clen = ocfs2_resmap_find_free_bits(resmap, wanted, goal,
560 next_resv->r_start - goal,
699 unsigned int goal = 0;
706 * start goal makes sense.
709 goal = resv->r_last_start + resv->r_last_len;
710 if (goal >= resmap->m_bitmap_len)
711 goal = 0;
714 __ocfs2_resv_find_window(resmap, resv, goal, wanted);
717 if (ocfs2_resv_empty(resv) && goal != 0)