Home
last modified time | relevance | path

Searched refs:blockIndex (Results 1 – 25 of 26) sorted by relevance

12

/haiku/src/tests/system/kernel/file_corruption/fs/
H A DBlock.cpp31 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 DTransaction.cpp186 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 DBlock.h23 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 DNode.cpp28 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 DVolume.cpp265 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 DFile.cpp63 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 DBlockAllocator.cpp375 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 DDirectory.cpp46 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 DTransaction.h65 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 Dchecksumfs.cpp161 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 DDirectory.h14 Directory(Volume* volume, uint64 blockIndex,
27 status_t InsertEntry(const char* name, uint64 blockIndex,
H A DNode.h31 Node(Volume* volume, uint64 blockIndex,
36 void SetBlockIndex(uint64 blockIndex);
68 void SetParentDirectory(uint32 blockIndex);
69 void SetAttributeDirectory(uint32 blockIndex);
H A DSymLink.cpp19 SymLink::SymLink(Volume* volume, uint64 blockIndex, in SymLink() argument
22 Node(volume, blockIndex, nodeData) in SymLink()
H A DVolume.h41 status_t GetNode(uint64 blockIndex, Node*& _node);
46 status_t ReadNode(uint64 blockIndex, Node*& _node);
H A DSymLink.h14 SymLink(Volume* volume, uint64 blockIndex,
H A DFile.h17 File(Volume* volume, uint64 blockIndex,
/haiku/src/apps/charactermap/
H A DUnicodeBlockView.cpp15 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 DCharacterView.cpp92 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 DUnicodeBlockView.h16 BlockListItem(const char* label, uint32 blockIndex);
45 bool IsShowingBlock(int32 blockIndex) const;
H A DCharacterView.h32 bool IsShowingBlock(int32 blockIndex) const;
34 void ScrollToBlock(int32 blockIndex);
/haiku/src/tests/system/kernel/file_corruption/driver/
H A Dchecksum_device.cpp74 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 Dchecksum_device.h21 uint64 blockIndex; member
/haiku/src/add-ons/kernel/file_systems/ext2/
H A DVolume.cpp433 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 DVMAnonymousCache.cpp121 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 Dtarfs.cpp679 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()

12