[block] remove flush() method

This commit is contained in:
Joe Thornber 2011-08-31 13:19:55 +01:00
parent 6d37d86d55
commit 2973c64e00
2 changed files with 0 additions and 15 deletions

View File

@ -149,12 +149,6 @@ namespace persistent_data {
typename validator::ptr v =
typename validator::ptr(new noop_validator()));
// If you aren't using a superblock, then this flush method
// will write all dirty data. Throws if any locks are
// held.
// FIXME: do we need this?
void flush();
block_address get_nr_blocks() const;
private:

View File

@ -157,15 +157,6 @@ block_manager<BlockSize>::superblock_zero(block_address location,
return write_ref(b);
}
template <uint32_t BlockSize>
void
block_manager<BlockSize>::flush()
{
if (lock_count_ > 0)
throw runtime_error("asked to flush while locks are still held");
::fsync(fd_);
}
template <uint32_t BlockSize>
void
block_manager<BlockSize>::read_buffer(block_address b, block_manager<BlockSize>::buffer &buffer) const