vitastor/blockstore.cpp

70 lines
1.2 KiB
C++
Raw Normal View History

// Copyright (c) Vitaliy Filippov, 2019+
// License: VNPL-1.0 (see README.md for details)
#include "blockstore_impl.h"
2019-11-01 02:47:57 +03:00
blockstore_t::blockstore_t(blockstore_config_t & config, ring_loop_t *ringloop)
2019-11-01 02:47:57 +03:00
{
impl = new blockstore_impl_t(config, ringloop);
}
2019-10-31 13:49:46 +03:00
blockstore_t::~blockstore_t()
{
delete impl;
}
void blockstore_t::loop()
2019-11-18 02:36:53 +03:00
{
impl->loop();
2019-11-18 02:36:53 +03:00
}
bool blockstore_t::is_started()
2019-11-05 02:12:04 +03:00
{
return impl->is_started();
}
2020-01-10 01:23:46 +03:00
bool blockstore_t::is_stalled()
{
return impl->is_stalled();
}
bool blockstore_t::is_safe_to_stop()
2019-11-11 21:22:28 +03:00
{
return impl->is_safe_to_stop();
2019-11-11 21:22:28 +03:00
}
void blockstore_t::enqueue_op(blockstore_op_t *op)
{
impl->enqueue_op(op, false);
}
void blockstore_t::enqueue_op_first(blockstore_op_t *op)
{
impl->enqueue_op(op, true);
}
2020-02-12 12:30:50 +03:00
std::unordered_map<object_id, uint64_t> & blockstore_t::get_unstable_writes()
{
return impl->unstable_writes;
}
uint32_t blockstore_t::get_block_size()
{
return impl->get_block_size();
}
uint64_t blockstore_t::get_block_count()
{
return impl->get_block_count();
2019-11-05 02:12:04 +03:00
}
2020-01-30 22:06:46 +03:00
uint64_t blockstore_t::get_free_block_count()
{
return impl->get_free_block_count();
}
2020-01-30 22:06:46 +03:00
uint32_t blockstore_t::get_disk_alignment()
{
return impl->get_disk_alignment();
}