Home | History | Annotate | Download | only in src

Lines Matching refs:block

81 void DiskBlockTable::InsertOnStructure(BlockData *block) {
82 int64 address = block->address();
84 sd->block = block;
86 // Creating new block ...
99 int DiskBlockTable::RemoveBlock(BlockData *block) {
102 int64 address = block->address();
112 // Everything is fine, removing block from table.
119 block->DecreaseReferenceCounter();
120 if (block->GetReferenceCounter() == 0)
121 delete block;
122 else if (block->GetReferenceCounter() < 0)
132 int DiskBlockTable::ReleaseBlock(BlockData *block) {
136 int references = block->GetReferenceCounter();
138 delete block;
140 block->DecreaseReferenceCounter();
168 BlockData *b = it->second->block;
169 // A block is returned only if its content is written on disk.
197 BlockData *block = new BlockData();
199 if (block == NULL) {
206 // Align the first sector with the beginning of a write block
211 // sector in the block from.
221 // Make sure the block is within the segment.
227 // Make sure the entire block is in range.
232 // Check to see if the block is free. Since the blocks are
234 // to check each sector, just the first block (a sector
244 block->set_address(sector);
245 block->set_size(write_block_size_);
246 block->IncreaseReferenceCounter();
247 InsertOnStructure(block);
251 delete block;
252 block = NULL;
255 return block;