mirror of
https://github.com/ksherlock/profuse.git
synced 2026-03-12 02:41:41 +00:00
git-svn-id: https://profuse.googlecode.com/svn/branches/v2@240 aa027e90-d47c-11dd-86d7-074df07e0730
This commit is contained in:
@@ -58,3 +58,18 @@ BlockCache *BlockCache::Create(BlockDevice *device)
|
||||
|
||||
return device->createBlockCache();
|
||||
}
|
||||
|
||||
|
||||
void BlockCache::zeroBlock(unsigned block)
|
||||
{
|
||||
/*
|
||||
void *address = acquire(block);
|
||||
std::memset(address, 0, 512);
|
||||
release(block, true);
|
||||
*/
|
||||
|
||||
uint8_t buffer[512];
|
||||
|
||||
std::memset(buffer, 0, 512);
|
||||
write(block, buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user