Lines Matching defs:start

102 			size_t size, uint32 start = 0, uint32 length = 0)
106 fStart(start),
174 inline void Allocate(uint16 start, uint16 numBlocks);
175 inline void Free(uint16 start, uint16 numBlocks);
198 void AddFreeRange(int32 start, int32 blocks);
201 status_t Allocate(Transaction& transaction, uint16 start, int32 length);
202 status_t Free(Transaction& transaction, uint16 start, int32 length);
274 AllocationBlock::Allocate(uint16 start, uint16 numBlocks)
276 ASSERT(start < fNumBits);
277 ASSERT(uint32(start + numBlocks) <= fNumBits);
283 start, numBlocks));
285 int32 block = start >> 5;
289 for (int32 i = start % 32; i < 32 && numBlocks; i++, numBlocks--)
299 "allocated, start = %u, numBlocks = %u\n", start, numBlocks));
305 start = 0;
308 start, numBlocks));
313 AllocationBlock::Free(uint16 start, uint16 numBlocks)
315 ASSERT(start < fNumBits);
316 ASSERT(uint32(start + numBlocks) <= fNumBits);
321 int32 block = start >> 5;
325 for (int32 i = start % 32; i < 32 && numBlocks; i++, numBlocks--)
332 start = 0;
354 AllocationGroup::AddFreeRange(int32 start, int32 blocks)
357 // PRINT(("range of %ld blocks starting at %ld\n",blocks,start)));
360 fFirstFree = start;
363 fLargestStart = start;
379 AllocationGroup::Allocate(Transaction& transaction, uint16 start, int32 length)
381 ASSERT(start + length <= (int32)fNumBits);
386 if (start == fFirstFree)
387 fFirstFree = start + length;
392 if (fLargestStart == start) {
393 // cut from start
397 } else if (start > fLargestStart
398 && start < fLargestStart + fLargestLength) {
400 fLargestLength = start - fLargestStart;
415 uint32 block = start / bitsPerBlock;
416 start = start % bitsPerBlock;
427 if (start + numBlocks > cached.NumBlockBits())
428 numBlocks = cached.NumBlockBits() - start;
430 cached.Allocate(start, numBlocks);
433 start = 0;
448 AllocationGroup::Free(Transaction& transaction, uint16 start, int32 length)
450 ASSERT(start + length <= (int32)fNumBits);
454 if (fFirstFree > start)
455 fFirstFree = start;
459 ASSERT(!fLargestValid || start + length <= fLargestStart
460 || start > fLargestStart);
463 && (start + length == fLargestStart
464 || fLargestStart + fLargestLength == start
465 || (start < fLargestStart && fLargestStart > fLargestLength)
466 || (start > fLargestStart
476 uint32 block = start / bitsPerBlock;
477 start = start % bitsPerBlock;
487 if (uint32(start + length) > cached.NumBlockBits())
488 freeLength = cached.NumBlockBits() - start;
490 cached.Free(start, freeLength);
493 start = 0;
655 int32 start = -1, range = 0;
664 groups[i].AddFreeRange(start, range);
668 // block is free, start new free range
669 start = bit;
674 groups[i].AddFreeRange(start, range);
726 at group \a groupIndex with offset \a start. The resulting allocation
734 uint16 start, uint16 maximum, uint16 minimum, block_run& run)
739 FUNCTION_START(("group = %" B_PRId32 ", start = %" B_PRIu16
741 groupIndex, start, maximum, minimum));
753 for (int32 i = 0; i < fNumGroups + 1; i++, groupIndex++, start = 0) {
759 if (start >= group.NumBits() || group.IsFull())
765 if (start < group.fFirstFree)
766 start = group.fFirstFree;
772 if (group.fLargestStart >= start) {
792 uint32 block = start / (fVolume->BlockSize() << 3);
796 int32 currentBit = start;
797 bool canFindGroupLargest = start == 0;
807 for (uint32 bit = start % bitsPerFullBlock;
811 // start new range
855 // start from the beginning of the next block
856 start = 0;
900 run.start = HOST_ENDIAN_TO_BFS_INT16(bestStart);
926 // if necessary) - we will start with those described in Dominic Giampaolo's
967 uint16 start = 0;
984 start = data.direct[last].Start() + data.direct[last].Length();
989 start = inode->BlockRun().Start();
991 // file data will start in the next allocation group
995 return AllocateBlocks(transaction, group, start, numBlocks, minimum, run);
1005 uint16 start = run.Start();
1008 FUNCTION_START(("group = %" B_PRId32 ", start = %" B_PRIu16
1009 ", length = %" B_PRIu16 "\n", group, start, length))
1015 || start > fGroups[group].NumBits()
1016 || uint32(start + length) > fGroups[group].NumBits()
1020 group, start, length));
1028 && start < uint32(fVolume->Log().Start()) + fVolume->Log().Length())) {
1031 group, start, length));
1042 if (fGroups[group].Free(transaction, start, length) != B_OK)
1128 // start new range
1228 // Block is free, start new free range
1252 BlockAllocator::CheckBlocks(off_t start, off_t length, bool allocated,
1255 if (start < 0 || start + length > fVolume->NumBlocks())
1258 off_t block = start;
1260 int32 group = start >> fVolume->AllocationGroupShift();
1261 uint32 bitmapBlock = start / (fVolume->BlockSize() << 3);
1262 uint32 blockOffset = start % (fVolume->BlockSize() << 3);
1403 kprintf(" start: %" B_PRId32 "\n", group.Start());
1405 kprintf(" largest start: %" B_PRId32 "%s\n", group.fLargestStart,