• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /xnu-2422.115.4/bsd/hfs/hfscommon/Misc/

Lines Matching refs:numBlocks

296 		register u_int32_t	numBlocks);
301 u_int32_t numBlocks,
311 u_int32_t numBlocks, struct jnl_trim_list *list);
423 ; numBlocks - The number of allocation blocks of the extent being freed.
426 static void hfs_unmap_free_extent(struct hfsmount *hfsmp, u_int32_t startingBlock, u_int32_t numBlocks)
434 KERNEL_DEBUG_CONSTANT(HFSDBG_UNMAP_FREE | DBG_FUNC_START, startingBlock, numBlocks, 0, 0, 0);
437 if (hfs_isallocated(hfsmp, startingBlock, numBlocks)) {
438 panic("hfs: %p: (%u,%u) unmapping allocated blocks", hfsmp, startingBlock, numBlocks);
445 length = (u_int64_t) numBlocks * hfsmp->blockSize;
488 ; numBlocks - The number of allocation blocks of the extent being freed.
493 u_int32_t numBlocks, struct jnl_trim_list *list) {
502 length = (u_int64_t) numBlocks * hfsmp->blockSize;
560 ; numBlocks - The number of allocation blocks being allocated.
564 static void hfs_unmap_alloc_extent(struct hfsmount *hfsmp, u_int32_t startingBlock, u_int32_t numBlocks)
571 KERNEL_DEBUG_CONSTANT(HFSDBG_UNMAP_ALLOC | DBG_FUNC_START, startingBlock, numBlocks, 0, 0, 0);
575 length = (u_int64_t) numBlocks * hfsmp->blockSize;
621 uint32_t startBlock, numBlocks;
630 numBlocks = extents[i].length / hfsmp->blockSize;
631 (void) add_free_extent_cache(hfsmp, startBlock, numBlocks);
1175 ; numBlocks - Number of allocation blocks to free up (must be > 0!)
1189 u_int32_t numBlocks, // Number of contiguous blocks to deallocate
1197 KERNEL_DEBUG_CONSTANT(HFSDBG_BLOCK_DEALLOCATE | DBG_FUNC_START, firstBlock, numBlocks, flags, 0, 0);
1202 if (numBlocks == 0) {
1213 if ((firstBlock + numBlocks) >= hfsmp->totalBlocks) {
1224 (void) hfs_release_summary (hfsmp, firstBlock, numBlocks);
1226 err = BlockMarkFreeInternal(vcb, firstBlock, numBlocks, true);
1241 vcb->freeBlocks += numBlocks;
1244 vcb->hfs_freed_block_count += numBlocks;
1246 if (vcb->nextAllocation == (firstBlock + numBlocks)) {
1247 HFS_UPDATE_NEXT_ALLOCATION(vcb, (vcb->nextAllocation - numBlocks));
1255 (void) add_free_extent_cache(vcb, firstBlock, numBlocks);
2226 register u_int32_t numBlocks)
2232 return BlockMarkAllocatedInternal(vcb, startingBlock, numBlocks);
2254 numBlocks Number of blocks to mark as allocated
2261 register u_int32_t numBlocks)
2277 KERNEL_DEBUG_CONSTANT(HFSDBG_MARK_ALLOC_BITMAP | DBG_FUNC_START, startingBlock, numBlocks, 0, 0, 0);
2292 err = CheckUnmappedBytes (hfsmp, (uint64_t) startingBlock, (uint64_t)numBlocks, &force_flush, &ignore);
2298 hfs_unmap_alloc_extent(vcb, startingBlock, numBlocks);
2335 if (numBits > numBlocks) {
2336 numBits = numBlocks; // entire allocation is inside this one word
2345 numBlocks -= numBits; // adjust number of blocks left to allocate
2356 while (numBlocks >= kBitsPerWord) {
2383 numBlocks -= kBitsPerWord;
2393 if (numBlocks != 0) {
2394 bitMask = ~(kAllBitsSetInWord >> numBlocks); // set first numBlocks bits
2449 register u_int32_t numBlocks)
2454 return BlockMarkFreeInternal(vcb, startingBlock, numBlocks, true);
2478 * numBlocks: Number of blocks in the range to mark unused
2482 OSErr BlockMarkFreeUnused(ExtendedVCB *vcb, u_int32_t startingBlock, register u_int32_t numBlocks)
2504 if (curNumBlocks > numBlocks) {
2505 curNumBlocks = numBlocks;
2512 numBlocks -= curNumBlocks;
2527 while (numBlocks) {
2528 if (numBlocks >= bitsPerBlock) {
2531 curNumBlocks = numBlocks;
2540 numBlocks -= curNumBlocks;
2558 numBlocks Number of blocks to mark as freed
2574 u_int32_t numBlocks = numBlocks_in;
2598 (startingBlock + numBlocks > vcb->totalBlocks)) {
2600 panic ("BlockMarkFreeInternal() free non-existent blocks at %u (numBlock=%u) on vol %s\n", startingBlock, numBlocks, vcb->vcbVN);
2603 printf ("hfs: BlockMarkFreeInternal() trying to free non-existent blocks starting at %u (numBlock=%u) on volume %s\n", startingBlock, numBlocks, vcb->vcbVN);
2662 if (numBits > numBlocks) {
2663 numBits = numBlocks; // entire allocation is inside this one word
2671 numBlocks -= numBits; // adjust number of blocks left to free
2681 while (numBlocks >= kBitsPerWord) {
2707 numBlocks -= kBitsPerWord;
2717 if (numBlocks != 0) {
2718 bitMask = ~(kAllBitsSetInWord >> numBlocks); // set first numBlocks bits
3259 * numBlocks Total number of blocks that need to be scanned.
3277 u_int32_t numBlocks, Boolean stop_on_first, u_int32_t *allocCount)
3292 KERNEL_DEBUG_CONSTANT(HFSDBG_IS_ALLOCATED | DBG_FUNC_START, startingBlock, numBlocks, stop_on_first, 0, 0);
3322 if (numBits > numBlocks) {
3323 numBits = numBlocks;
3333 numBlocks -= numBits;
3341 while (numBlocks >= kBitsPerWord) {
3364 numBlocks -= kBitsPerWord;
3372 if (numBlocks != 0) {
3373 bitMask = ~(kAllBitsSetInWord >> numBlocks);
3424 u_int32_t numBlocks, u_int32_t *allocCount)
3426 return hfs_isallocated_internal(hfsmp, startBlock, numBlocks, false, allocCount);
3446 hfs_isallocated(struct hfsmount *hfsmp, u_int32_t startingBlock, u_int32_t numBlocks)
3451 error = hfs_isallocated_internal(hfsmp, startingBlock, numBlocks, true, &allocCount);
4581 u_int32_t numBlocks = 1;
4618 if (numBits > numBlocks) {
4619 numBits = numBlocks;
4626 numBlocks -= numBits;