• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/hfs/hfscommon/Misc/

Lines Matching refs:block

44 					asked for.  Returns the starting block number, and number of
60 specifies where to begin the search (by block number). The
61 block number of the first block in the range is returned.
77 Given an allocation block number, read the bitmap block that
78 contains that allocation block into a caller-supplied buffer.
81 Release a bitmap block back into the buffer cache.
167 ; the requested starting allocation block. If there is not enough
168 ; room there, a block of less than the requested size will be
171 ; If the requested starting block is 0 (for new file allocations),
172 ; the volume's allocation block pointer will be used as a starting
178 ; startingBlock - Preferred starting allocation block, 0 = no preference
191 ; *startBlock - Actual starting allocation block
202 u_int32_t startingBlock, /* preferred starting block, or 0 for no preference */
209 u_int32_t *actualStartBlock, /* actual first block of allocation */
246 // If caller didn't specify a starting block number, then use the volume's
247 // next block to allocate from.
261 // that is long enough. Otherwise, find the first free block.
301 // still need to update things like the free block count).
342 ; firstBlock - First allocation block to be freed
356 u_int32_t firstBlock, // First block in range to deallocate
377 // Update the volume's free block count, and mark the VCB as dirty.
427 * Get next bitmap block.
454 * Obtain the next allocation block (bit) that's
481 ; Function: Read in a bitmap block corresponding to a given allocation
482 ; block (bit). Return a pointer to the bitmap block.
486 ; bit -- Allocation block whose bitmap block is desired
489 ; buffer -- Pointer to bitmap block corresonding to "block"
502 daddr64_t block;
511 block = (daddr64_t)(bit / (blockSize * kBitsPerByte));
518 block += vcb->vcbVBMSt; /* map to physical block */
521 err = (int)buf_meta_bread(vp, block, blockSize, NOCRED, &bp);
543 ; Function: Relase a bitmap block.
595 startingBlock Preferred first block for allocation
601 actualStartBlock First block of range allocated, or 0 if error
657 one free block.
661 startingBlock Preferred first block for allocation
662 endingBlock Last block to check + 1
667 actualStartBlock First block of range allocated, or 0 if error
681 register u_int32_t block; // current block number
682 register u_int32_t currentWord; // Pointer to current word within bitmap block
684 register u_int32_t wordsLeft; // Number of words left in this bitmap block
717 // Pre-read the first bitmap block
724 // Set up the current position within the block
740 // Find the first unallocated block
742 block=startingBlock;
743 while (block < endingBlock) {
748 ++block;
756 // Next block
765 block = NextBitmapBlock(vcb, block);
767 if (block >= endingBlock) {
772 err = ReadBitmapBlock(vcb, block, &currCache, &blockRef);
782 // Did we get to the end of the bitmap before finding a free block?
784 if (block >= endingBlock) {
789 // Return the first block in the allocated range
790 *actualStartBlock = block;
795 // would be (block + maxBlocks) < endingBlock, but that could overflow. The
797 if (block < (endingBlock-maxBlocks)) {
798 endingBlock = block + maxBlocks; // if we get this far, we've found enough
810 // Allocate this block
813 // Move to the next block. If no more, then exit.
814 ++block;
815 if (block == endingBlock)
828 // Next block
839 nextBlock = NextBitmapBlock(vcb, block);
840 if (nextBlock != block) {
845 err = ReadBitmapBlock(vcb, block, &currCache, &blockRef);
864 *actualNumBlocks = block - *actualStartBlock;
895 actualStartBlock First block of range allocated, or 0 if error
990 startingBlock First block number to mark as allocated
1001 register u_int32_t *currentWord; // Pointer to current word within bitmap block
1002 register u_int32_t wordsLeft; // Number of words left in this bitmap block
1015 // Pre-read the bitmap block containing the first word of allocation
1040 // If the first block to allocate doesn't start on a word
1062 --wordsLeft; // one less word left in this block
1072 // Read in the next bitmap block
1073 startingBlock += bitsPerBlock; // generate a block number in the next bitmap block
1100 --wordsLeft; // one less word left in this block
1110 // Read in the next bitmap block
1111 startingBlock += bitsPerBlock; // generate a block number in the next bitmap block
1159 startingBlock First block number to mark as freed
1170 register u_int32_t *currentWord; // Pointer to current word within bitmap block
1171 register u_int32_t wordsLeft; // Number of words left in this bitmap block
1200 // Pre-read the bitmap block containing the first word of allocation
1225 // If the first block to free doesn't start on a word
1245 --wordsLeft; // one less word left in this block
1254 // Read in the next bitmap block
1255 startingBlock += bitsPerBlock; // generate a block number in the next bitmap block
1280 --wordsLeft; // one less word left in this block
1290 // Read in the next bitmap block
1291 startingBlock += bitsPerBlock; // generate a block number in the next bitmap block
1353 startingBlock Preferred first block of range
1354 endingBlock Last possible block in range + 1
1360 actualStartBlock First block of range found, or 0 if error
1381 u_int32_t firstBlock; // First free block in current extent.
1382 u_int32_t stopBlock; // If we get to this block, stop searching for first free block.
1426 // Pre-read the first bitmap block.
1445 // Look for a free block, skipping over allocated blocks.
1476 // See if it's time to read another block.
1562 // See if it's time to read another block.
1613 // Make sure we didn't run out of bitmap looking for a used block.
1687 u_int32_t *currentWord; // Pointer to current word within bitmap block
1688 u_int32_t wordsLeft; // Number of words left in this bitmap block
1700 * Pre-read the bitmap block containing the first word of allocation
1745 /* Read in the next bitmap block. */
1774 /* Read in the next bitmap block */