Lines Matching refs:startBlock

411 	u_int32_t startBlock, 
434 static void remove_free_extent_cache(struct hfsmount *hfsmp, u_int32_t startBlock, u_int32_t blockCount);
435 static Boolean add_free_extent_cache(struct hfsmount *hfsmp, u_int32_t startBlock, u_int32_t blockCount);
701 uint32_t startBlock, numBlocks;
709 startBlock = (extents[i].offset - hfsmp->hfsPlusIOPosOffset) / hfsmp->blockSize;
711 (void) add_free_extent_cache(hfsmp, startBlock, numBlocks);
809 ; *startBlock - Actual starting allocation block
2146 *actualStartBlock = vcb->vcbFreeExt[0].startBlock;
3334 if (vcb->vcbFreeExt[i].startBlock < min_start) {
3335 min_start = vcb->vcbFreeExt[i].startBlock;
3487 hfs_isrbtree_allocated (struct hfsmount *hfsmp, u_int32_t startBlock,
3498 search_sentinel.offset = startBlock;
3513 * at least <= startBlock. So, if the end of the node is greater than the end of
3517 if ((node->offset + node->length) >= (startBlock + numBlocks)) {
3518 if (node->offset > startBlock) {
3529 * must be greater than startBlock.
3729 hfs_count_allocated(struct hfsmount *hfsmp, u_int32_t startBlock,
3732 return hfs_isallocated_internal(hfsmp, startBlock, numBlocks, false, allocCount);
4362 * startBlock - Start of extent to remove
4396 * startBlock - Start of extent to add
4404 static int add_free_extent_list(struct hfsmount *hfsmp, u_int32_t startBlock, u_int32_t blockCount)
4410 uint32_t endBlock = startBlock + blockCount;
4412 if (endBlock < hfsmp->vcbFreeExt[i].startBlock ||
4413 startBlock > (hfsmp->vcbFreeExt[i].startBlock + hfsmp->vcbFreeExt[i].blockCount)) {
4417 hfsmp, startBlock, blockCount, hfsmp->vcbFreeExt[i].startBlock, hfsmp->vcbFreeExt[i].blockCount, i);
4425 if (startBlock < hfsmp->vcbFreeExt[i].startBlock) {
4460 hfsmp->vcbFreeExt[i].startBlock = startBlock;
4477 * startBlock - starting block of the extent to be removed.
4480 static void remove_free_extent_cache(struct hfsmount *hfsmp, u_int32_t startBlock, u_int32_t blockCount)
4494 KERNEL_DEBUG_CONSTANT(HFSDBG_REMOVE_EXTENT_CACHE | DBG_FUNC_START, startBlock, blockCount, 0, 0, 0);
4496 endBlock = startBlock + blockCount;
4505 currentStart = hfsmp->vcbFreeExt[i].startBlock;
4512 if (currentEnd <= startBlock || currentStart >= endBlock) {
4520 if (startBlock <= currentStart && endBlock >= currentEnd) {
4542 if (startBlock > currentStart && endBlock < currentEnd) {
4544 add_free_extent_list(hfsmp, currentStart, startBlock - currentStart);
4563 if (startBlock > currentStart) {
4565 insertedIndex = add_free_extent_list(hfsmp, currentStart, startBlock - currentStart);
4598 * startBlock - starting block of the extent to be removed.
4607 static Boolean add_free_extent_cache(struct hfsmount *hfsmp, u_int32_t startBlock, u_int32_t blockCount)
4615 KERNEL_DEBUG_CONSTANT(HFSDBG_ADD_EXTENT_CACHE | DBG_FUNC_START, startBlock, blockCount, 0, 0, 0);
4632 if (startBlock >= hfsmp->allocLimit) {
4637 if ((startBlock + blockCount) > hfsmp->allocLimit) {
4638 blockCount = hfsmp->allocLimit - startBlock;
4648 endBlock = startBlock + blockCount;
4650 currentEnd = hfsmp->vcbFreeExt[i].startBlock + hfsmp->vcbFreeExt[i].blockCount;
4651 if (hfsmp->vcbFreeExt[i].startBlock > endBlock || currentEnd < startBlock) {
4656 if (hfsmp->vcbFreeExt[i].startBlock < startBlock)
4657 startBlock = hfsmp->vcbFreeExt[i].startBlock;
4672 add_free_extent_list(hfsmp, startBlock, endBlock - startBlock);
4707 start = hfsmp->vcbFreeExt[i].startBlock;
4740 if (start == hfsmp->vcbFreeExt[j].startBlock) {
4742 hfsmp, i, start, nblocks, j, hfsmp->vcbFreeExt[j].startBlock,
4751 if (hfsmp->vcbFreeExt[i].startBlock > hfsmp->vcbFreeExt[i+1].startBlock) {
4753 hfsmp, i, start, nblocks, i+1, hfsmp->vcbFreeExt[i+1].startBlock,
4760 hfsmp, i, start, nblocks, i+1, hfsmp->vcbFreeExt[i+1].startBlock,