/haiku/src/tests/system/kernel/file_corruption/fs/ |
H A D | Block.cpp | 31 Block::GetReadable(Volume* volume, uint64 blockIndex) in GetReadable() argument 35 return _Init(volume, blockIndex, in GetReadable() 36 block_cache_get(volume->BlockCache(), blockIndex), NULL); in GetReadable() 41 Block::GetWritable(Volume* volume, uint64 blockIndex, Transaction& transaction) in GetWritable() argument 45 status_t error = transaction.RegisterBlock(blockIndex); in GetWritable() 49 return _Init(volume, blockIndex, in GetWritable() 50 block_cache_get_writable(volume->BlockCache(), blockIndex, in GetWritable() 57 Block::GetZero(Volume* volume, uint64 blockIndex, Transaction& transaction) in GetZero() argument 61 status_t error = transaction.RegisterBlock(blockIndex); in GetZero() 65 return _Init(volume, blockIndex, in GetZero() [all …]
|
H A D | Transaction.cpp | 186 blockInfo->indexAndCheckSum.blockIndex); in Abort() 289 Transaction::RegisterBlock(uint64 blockIndex) in RegisterBlock() argument 294 BlockInfo* info = fBlockInfos.Lookup(blockIndex); in RegisterBlock() 306 info->indexAndCheckSum.blockIndex = blockIndex; in RegisterBlock() 317 info->data = block_cache_get(fVolume->BlockCache(), blockIndex); in RegisterBlock() 330 Transaction::PutBlock(uint64 blockIndex, const void* data) in PutBlock() argument 334 BlockInfo* info = fBlockInfos.Lookup(blockIndex); in PutBlock() 337 blockIndex); in PutBlock() 343 B_PRIu64, blockIndex); in PutBlock() 353 info->indexAndCheckSum.blockIndex); in PutBlock() [all …]
|
H A D | Block.h | 23 bool GetReadable(Volume* volume, uint64 blockIndex); 24 bool GetWritable(Volume* volume, uint64 blockIndex, 26 bool GetZero(Volume* volume, uint64 blockIndex, 37 bool _Init(Volume* volume, uint64 blockIndex,
|
H A D | Node.cpp | 28 Node::Node(Volume* volume, uint64 blockIndex, const checksumfs_node& nodeData) in Node() argument 31 fBlockIndex(blockIndex), in Node() 75 Node::SetBlockIndex(uint64 blockIndex) in SetBlockIndex() argument 77 fBlockIndex = blockIndex; in SetBlockIndex() 155 Node::SetParentDirectory(uint32 blockIndex) in SetParentDirectory() argument 157 fNode.parentDirectory = blockIndex; in SetParentDirectory() 163 Node::SetAttributeDirectory(uint32 blockIndex) in SetAttributeDirectory() argument 165 fNode.attributeDirectory = blockIndex; in SetAttributeDirectory()
|
H A D | Volume.cpp | 265 Volume::GetNode(uint64 blockIndex, Node*& _node) in GetNode() argument 267 return get_vnode(fFSVolume, blockIndex, (void**)&_node); in GetNode() 293 Volume::ReadNode(uint64 blockIndex, Node*& _node) in ReadNode() argument 295 if (blockIndex == 0 || blockIndex >= fTotalBlocks) in ReadNode() 300 if (!block.GetReadable(this, blockIndex)) in ReadNode() 310 node = new(std::nothrow) Directory(this, blockIndex, *nodeData); in ReadNode() 313 node = new(std::nothrow) File(this, blockIndex, *nodeData); in ReadNode() 316 node = new(std::nothrow) SymLink(this, blockIndex, *nodeData); in ReadNode() 319 node = new(std::nothrow) Node(this, blockIndex, *nodeData); in ReadNode() 384 uint64 blockIndex = node->BlockIndex(); in DeleteNode() local [all …]
|
H A D | File.cpp | 63 File::File(Volume* volume, uint64 blockIndex, const checksumfs_node& nodeData) in File() argument 65 Node(volume, blockIndex, nodeData), in File() 336 uint64 blockIndex = BlockIndex(); in GetFileVecs() local 339 B_PRIu64 "\n", firstBlock, blockIndex); in GetFileVecs() 343 if (!info.block.GetReadable(GetVolume(), blockIndex)) in GetFileVecs() 355 blockIndex = info.blockData[info.index]; in GetFileVecs() 359 info.index, firstBlock, blockIndex); in GetFileVecs() 379 blockIndex = info.blockData[info.index]; in GetFileVecs() 382 B_PRIu64 "\n", level, info.index, blockIndex); in GetFileVecs() 388 if (!infos[level].block.GetReadable(GetVolume(), blockIndex)) in GetFileVecs() [all …]
|
H A D | BlockAllocator.cpp | 375 uint32 blockIndex = base / kBlocksPerBitmapBlock % kBitmapBlocksPerGroup; in _AllocateInGroup() local 383 if (counts[blockIndex] > 0) { in _AllocateInGroup() 387 counts[blockIndex] -= allocated; in _AllocateInGroup() 405 blockIndex++; in _AllocateInGroup() 410 while (blockIndex < kBitmapBlocksPerGroup && base < searchEnd) { in _AllocateInGroup() 411 if (counts[blockIndex] > 0) in _AllocateInGroup() 415 blockIndex++; in _AllocateInGroup() 419 if (blockIndex == kBitmapBlocksPerGroup) in _AllocateInGroup() 433 if (counts[blockIndex] == 0) in _AllocateInGroup() 445 counts[blockIndex] -= allocated; in _AllocateInGroup() [all …]
|
H A D | Directory.cpp | 46 size_t nameLength, uint64 blockIndex); 72 status_t InsertEntry(const char* name, uint64 blockIndex, 98 size_t nameLength, uint64 blockIndex, 108 bool _Check(int32 level, uint64 blockIndex, 277 uint64 blockIndex) in InsertEntry() argument 313 blockIndices[-index] = blockIndex; in InsertEntry() 591 uint64 blockIndex = entryBlock.BlockIndexAt(index); in LookupEntry() local 598 _blockIndex = blockIndex; in LookupEntry() 604 if (!block.GetReadable(fDirectory->GetVolume(), blockIndex)) in LookupEntry() 752 DirEntryTree::InsertEntry(const char* name, uint64 blockIndex, in InsertEntry() argument [all …]
|
H A D | Transaction.h | 65 status_t RegisterBlock(uint64 blockIndex); 66 void PutBlock(uint64 blockIndex, const void* data); 96 return HashKey(value->indexAndCheckSum.blockIndex); in Hash() 101 return value->indexAndCheckSum.blockIndex == key; in Compare()
|
H A D | checksumfs.cpp | 161 uint64 blockIndex; in ReadNextEntry() local 168 blockIndex = fDirectory->BlockIndex(); in ReadNextEntry() 174 blockIndex = fDirectory->ParentDirectory(); in ReadNextEntry() 179 fEntryName, nameLength, blockIndex); in ReadNextEntry() 198 buffer->d_ino = blockIndex; in ReadNextEntry() 265 uint64 blockIndex = fNode->AttributeDirectory(); in _UpdateAttributeDirectory() local 266 if (blockIndex == 0) { in _UpdateAttributeDirectory() 277 if (blockIndex == fAttributeDirectory->BlockIndex()) in _UpdateAttributeDirectory() 288 status_t error = fNode->GetVolume()->GetNode(blockIndex, node); in _UpdateAttributeDirectory() 296 B_PRIu64 " is not a directory!\n", blockIndex, in _UpdateAttributeDirectory() [all …]
|
H A D | Directory.h | 14 Directory(Volume* volume, uint64 blockIndex, 27 status_t InsertEntry(const char* name, uint64 blockIndex,
|
H A D | Node.h | 31 Node(Volume* volume, uint64 blockIndex, 36 void SetBlockIndex(uint64 blockIndex); 68 void SetParentDirectory(uint32 blockIndex); 69 void SetAttributeDirectory(uint32 blockIndex);
|
H A D | SymLink.cpp | 19 SymLink::SymLink(Volume* volume, uint64 blockIndex, in SymLink() argument 22 Node(volume, blockIndex, nodeData) in SymLink()
|
H A D | Volume.h | 41 status_t GetNode(uint64 blockIndex, Node*& _node); 46 status_t ReadNode(uint64 blockIndex, Node*& _node);
|
H A D | SymLink.h | 14 SymLink(Volume* volume, uint64 blockIndex,
|
H A D | File.h | 17 File(Volume* volume, uint64 blockIndex,
|
/haiku/src/apps/charactermap/ |
H A D | UnicodeBlockView.cpp | 15 BlockListItem::BlockListItem(const char* label, uint32 blockIndex) in BlockListItem() argument 17 fBlockIndex(blockIndex) in BlockListItem() 79 UnicodeBlockView::IsShowingBlock(int32 blockIndex) const in IsShowingBlock() 81 if (blockIndex < 0 || blockIndex >= (int32)kNumUnicodeBlocks) in IsShowingBlock() 84 if (!fShowPrivateBlocks && kUnicodeBlocks[blockIndex].private_block) in IsShowingBlock() 94 if (kUnicodeBlocks[blockIndex].block != kNoBlock) in IsShowingBlock() 95 return (fUnicodeBlocks & kUnicodeBlocks[blockIndex].block) != kNoBlock; in IsShowingBlock() 98 kUnicodeBlocks[blockIndex].start, in IsShowingBlock() 99 kUnicodeBlocks[blockIndex].end)) in IsShowingBlock() 154 int32 blockIndex = IndexOf(block); in SelectBlockForCharacter() local [all …]
|
H A D | CharacterView.cpp | 92 CharacterView::IsShowingBlock(int32 blockIndex) const in IsShowingBlock() 94 if (blockIndex < 0 || blockIndex >= (int32)kNumUnicodeBlocks) in IsShowingBlock() 97 if (!fShowPrivateBlocks && kUnicodeBlocks[blockIndex].private_block) in IsShowingBlock() 107 if (kUnicodeBlocks[blockIndex].block != kNoBlock) in IsShowingBlock() 108 return (fUnicodeBlocks & kUnicodeBlocks[blockIndex].block) != kNoBlock; in IsShowingBlock() 111 kUnicodeBlocks[blockIndex].start, in IsShowingBlock() 112 kUnicodeBlocks[blockIndex].end)) in IsShowingBlock() 121 CharacterView::ScrollToBlock(int32 blockIndex) in ScrollToBlock() argument 126 if (IsBlockVisible(blockIndex)) in ScrollToBlock() 129 if (blockIndex < 0) in ScrollToBlock() [all …]
|
H A D | UnicodeBlockView.h | 16 BlockListItem(const char* label, uint32 blockIndex); 45 bool IsShowingBlock(int32 blockIndex) const;
|
H A D | CharacterView.h | 32 bool IsShowingBlock(int32 blockIndex) const; 34 void ScrollToBlock(int32 blockIndex);
|
/haiku/src/tests/system/kernel/file_corruption/driver/ |
H A D | checksum_device.cpp | 74 uint64 blockIndex; member 117 status_t GetCheckSum(uint64 blockIndex, CheckSum& checkSum) in GetCheckSum() 119 ASSERT(blockIndex < fBlockCount); in GetCheckSum() 125 fBlockCount + blockIndex / kCheckSumsPerBlock, block); in GetCheckSum() 129 checkSum = block->checkSums[blockIndex % kCheckSumsPerBlock]; in GetCheckSum() 134 status_t SetCheckSum(uint64 blockIndex, const CheckSum& checkSum) in SetCheckSum() 136 ASSERT(blockIndex < fBlockCount); in SetCheckSum() 142 fBlockCount + blockIndex / kCheckSumsPerBlock, block); in SetCheckSum() 146 block->checkSums[blockIndex % kCheckSumsPerBlock] = checkSum; in SetCheckSum() 151 blockIndex); in SetCheckSum() [all …]
|
H A D | checksum_device.h | 21 uint64 blockIndex; member
|
/haiku/src/add-ons/kernel/file_systems/ext2/ |
H A D | Volume.cpp | 433 Volume::_GroupDescriptorBlock(uint32 blockIndex) in _GroupDescriptorBlock() argument 437 || blockIndex < fSuperBlock.FirstMetaBlockGroup()) in _GroupDescriptorBlock() 438 return fFirstDataBlock + blockIndex + 1; in _GroupDescriptorBlock() 487 int32 blockIndex = index / fGroupsPerBlock; in GetBlockGroup() local 492 if (fGroupBlocks[blockIndex] == NULL) { in GetBlockGroup() 494 const uint8* block = cached.SetTo(_GroupDescriptorBlock(blockIndex)); in GetBlockGroup() 498 fGroupBlocks[blockIndex] = (uint8*)malloc(fBlockSize); in GetBlockGroup() 499 if (fGroupBlocks[blockIndex] == NULL) in GetBlockGroup() 502 memcpy(fGroupBlocks[blockIndex], block, fBlockSize); in GetBlockGroup() 505 ((ext2_block_group*)(fGroupBlocks[blockIndex] + blockOffset in GetBlockGroup() [all …]
|
/haiku/src/system/kernel/vm/ |
H A D | VMAnonymousCache.cpp | 121 off_t blockIndex = key.page_index >> SWAP_BLOCK_SHIFT; in HashKey() local 123 return blockIndex ^ (size_t)(int*)cache; in HashKey() 530 swap_addr_t blockIndex = pageIndex & SWAP_BLOCK_MASK; in _FreeSwapPageRange() local 531 if (swapBlock == NULL || blockIndex == 0) { in _FreeSwapPageRange() 541 swap_addr_t slotIndex = swapBlock->swap_slots[blockIndex]; in _FreeSwapPageRange() 564 swapBlock->swap_slots[blockIndex] = SWAP_SLOT_NONE; in _FreeSwapPageRange() 653 swap_addr_t blockIndex = pageIndex & SWAP_BLOCK_MASK; in Adopt() local 654 if (swapBlock == NULL || blockIndex == 0) { in Adopt() 682 ASSERT(swapBlock->swap_slots[blockIndex] == SWAP_SLOT_NONE); in Adopt() 684 swapBlock->swap_slots[blockIndex] = slotIndex; in Adopt() [all …]
|
/haiku/src/system/boot/loader/file_systems/tarfs/ |
H A D | tarfs.cpp | 679 int blockIndex = 0; in Init() local 681 while (blockIndex < blockCount) { in Init() 683 tar_header* header = (tar_header*)(block + blockIndex * BLOCK_SIZE); in Init() 691 dprintf("Bad tar header magic in block %d.\n", blockIndex); in Init() 729 blockIndex += (size + 2 * BLOCK_SIZE - 1) / BLOCK_SIZE; in Init()
|