Home | History | Annotate | Download | only in src

Lines Matching refs:block

69 void DiskBlockTable::InsertOnStructure(BlockData *block) {
70 int64 address = block->GetAddress();
72 sd->block = block;
74 // Creating new block ...
87 int DiskBlockTable::RemoveBlock(BlockData *block) {
90 int64 address = block->GetAddress();
107 block->DecreaseReferenceCounter();
108 if (block->GetReferenceCounter() == 0)
109 delete block;
118 int DiskBlockTable::ReleaseBlock(BlockData *block) {
122 int references = block->GetReferenceCounter();
125 delete block;
127 block->DecreaseReferenceCounter();
156 BlockData *b = it->second->block;
157 // A block is returned only if its content is written on disk.
183 BlockData *block = new BlockData();
188 if (block == NULL) {
198 // Align the first sector with the beginning of a write block
205 // sector in the block from.
217 // Make sure the block is within the segment.
223 // Make sure the entire block is in range.
228 // Check to see if the block is free. Since the blocks are
230 // to check each sector, just the first block (a sector
241 block->SetParameters(sector, write_block_size_);
242 block->IncreaseReferenceCounter();
243 InsertOnStructure(block);
247 delete block;
248 block = NULL;
252 return block;