vitastor/src/blockstore.cpp

80 lines
1.5 KiB
C++
Raw Normal View History

// Copyright (c) Vitaliy Filippov, 2019+
// License: VNPL-1.1 (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, timerfd_manager_t *tfd)
2019-11-01 02:47:57 +03:00
{
impl = new blockstore_impl_t(config, ringloop, tfd);
}
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)
{
2021-03-06 22:53:18 +03:00
impl->enqueue_op(op);
}
int blockstore_t::read_bitmap(object_id oid, uint64_t target_version, void *bitmap, uint64_t *result_version)
{
return impl->read_bitmap(oid, target_version, bitmap, result_version);
}
std::map<uint64_t, uint64_t> & blockstore_t::get_inode_space_stats()
{
return impl->inode_space_stats;
}
void blockstore_t::dump_diagnostics()
{
return impl->dump_diagnostics();
}
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();
}
uint64_t blockstore_t::get_journal_size()
{
return impl->get_journal_size();
}
uint32_t blockstore_t::get_bitmap_granularity()
2020-01-30 22:06:46 +03:00
{
return impl->get_bitmap_granularity();
2020-01-30 22:06:46 +03:00
}