Lines Matching refs:goal
250 * @grp_goal: given goal block relative to the allocation block group
254 * Test if the given goal block (group relative) is within the file's
257 * If the reservation window is outside the goal allocation group, return 0;
258 * grp_goal (given goal block) could be -1, which means no specific
259 * goal block. In this case, always return 1.
260 * If the goal block is within the reservation window, return 1;
284 * @goal: target allocation block
286 * Find the reserved window which includes the goal, or the previous one
287 * if the goal is not in any window.
288 * Returns NULL if there are no windows or if all windows start after the goal.
291 search_reserve_window(struct rb_root *root, ext2_fsblk_t goal)
302 if (goal < rsv->rsv_start)
304 else if (goal > rsv->rsv_end)
310 * We've fallen off the end of the tree: the goal wasn't inside
312 * side of the interval containing the goal. If it's the RHS,
315 if (rsv->rsv_start > goal) {
424 * if filesystem is mounted with NORESERVATION, the goal
597 * the initial goal; then for a free byte somewhere in the bitmap;
608 * The goal was occupied; search forward for a free
621 ext2_debug("Bit not found near goal\n");
655 * Otherwise, the allocation range starts from the give goal block,
738 * the maximum block number that our goal reservable space
841 * allocate a new reservation window near the allocation goal,
842 * or the beginning of the group, if there is no goal.
844 * We first find a reservable space after the goal, then from
862 * @grp_goal: The goal (group-relative). It is where the search for a
864 * if we have a goal(goal >0 ), then start from there,
865 * no goal(goal = -1), we start from the first block
898 * and if the goal is inside the old reservation window,
932 * shift the search start to the window near the goal block
1056 * reservation window for it starting from the goal first. Then do the block
1087 * grp_goal is a group relative block number (if there is a goal)
1103 * c) we come here with a goal and with a reservation window
1106 * at the beginning with a goal and the goal is inside the window, or
1107 * we don't have a goal but already have a reservation window.
1194 * @goal: given target block(filesystem wide)
1198 * ext2_new_blocks uses a goal block to assist allocation. If the goal is
1199 * free, or there is a free block within 32 blocks of the goal, that block
1205 ext2_fsblk_t ext2_new_blocks(struct inode *inode, ext2_fsblk_t goal,
1212 ext2_grpblk_t grp_target_blk; /* blockgroup relative goal block */
1243 ext2_debug("goal=%lu.\n", goal);
1265 * First, test whether the goal block is free.
1267 if (goal < le32_to_cpu(es->s_first_data_block) ||
1268 goal >= le32_to_cpu(es->s_blocks_count))
1269 goal = le32_to_cpu(es->s_first_data_block);
1270 group_no = (goal - le32_to_cpu(es->s_first_data_block)) /
1289 grp_target_blk = ((goal - le32_to_cpu(es->s_first_data_block)) %
1343 * try to allocate block(s) from this group, without a goal(-1).
1433 ext2_fsblk_t ext2_new_block(struct inode *inode, unsigned long goal, int *errp)
1437 return ext2_new_blocks(inode, goal, &count, errp);