Lines Matching defs:goal
66 static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
172 * @goal: start search at this block's bit-pair (within @buffer)
175 * Scope of @goal and returned block number is only within this bitmap buffer,
189 u32 goal, u8 state)
191 u32 spoint = (goal << 1) & ((8*sizeof(u64)) - 1);
192 const __le64 *ptr = ((__le64 *)buf) + (goal >> 5);
959 u32 goal = 0, block;
965 if (goal >= rgd->rd_data)
969 block = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
974 /* rgblk_search can return a block < goal, so we need to
977 goal++;
1301 * @goal: the goal block within the RG (start here to search for avail block)
1313 * Scope of @goal and returned block is just within rgrp, not the whole
1319 static u32 rgblk_search(struct gfs2_rgrpd *rgd, u32 goal,
1331 /* Find bitmap block that contains bits for goal block */
1334 /* Convert scope of "goal" from rgrp-wide to within found bit block */
1335 if (goal < (bi->bi_start + bi->bi_len) * GFS2_NBBY) {
1336 goal -= bi->bi_start * GFS2_NBBY;
1341 goal = 0;
1362 blk = gfs2_bitfit(buffer, bi->bi_len, goal, old_state);
1366 if ((goal == 0) && (old_state == GFS2_BLKST_FREE))
1373 goal = 0;
1385 goal = blk;
1387 goal++;
1388 if (goal >= (bi->bi_len * GFS2_NBBY))
1390 if (gfs2_testbit(rgd, buffer, bi->bi_len, goal) !=
1394 bi->bi_len, goal, new_state);
1500 u32 goal, blk;
1505 goal = ip->i_goal - rgd->rd_data0;
1507 goal = rgd->rd_last_alloc;
1509 blk = rgblk_search(rgd, goal, GFS2_BLKST_FREE, GFS2_BLKST_USED, n);