[block] remove flush() method
This commit is contained in:
parent
6d37d86d55
commit
2973c64e00
6
block.h
6
block.h
@ -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:
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user